diff options
author | Christoph Hellwig | 2011-09-18 20:40:41 +0000 |
---|---|---|
committer | Alex Elder | 2011-10-11 21:15:03 -0500 |
commit | e7455e02e5effcdd49bb28e7dfface2d3473de52 (patch) | |
tree | 575d3f79215d575f2baf62b1279a7bfc567521e5 /fs/xfs | |
parent | ed32201e65e15f3e6955cb84cbb544b08f81e5a5 (diff) |
xfs: remove the first extent special case in xfs_bmap_add_extent
Both xfs_bmap_add_extent_hole_delay and xfs_bmap_add_extent_hole_real
already contain code to handle the case where there is no extent to
merge with, which is effectively the same as the code duplicated here.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index a6075c0f8456..927e5454a43c 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -466,26 +466,9 @@ xfs_bmap_add_extent( ASSERT(*idx <= nextents); /* - * This is the first extent added to a new/empty file. - * Special case this one, so other routines get to assume there are - * already extents in the list. - */ - if (nextents == 0) { - xfs_iext_insert(ip, *idx, 1, new, - whichfork == XFS_ATTR_FORK ? BMAP_ATTRFORK : 0); - - ASSERT(cur == NULL); - - if (!isnullstartblock(new->br_startblock)) { - XFS_IFORK_NEXT_SET(ip, whichfork, 1); - logflags = XFS_ILOG_CORE | xfs_ilog_fext(whichfork); - } else - logflags = 0; - } - /* * Any kind of new delayed allocation goes here. */ - else if (isnullstartblock(new->br_startblock)) { + if (isnullstartblock(new->br_startblock)) { if (cur) ASSERT((cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL) == 0); |