summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-10-19 21:07:10 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2017-10-27 01:38:27 +0300
commit6b18af0dfd1695c1d53a2eeead838a90c27b7cb4 (patch)
treedd87b9aeff264ee27d6e95caed045bcf2aa402a0 /fs/xfs/xfs_bmap_util.c
parent4ed36c6b09a536f0ff19cf914f6445306e3f315f (diff)
downloadlinux-6b18af0dfd1695c1d53a2eeead838a90c27b7cb4.tar.xz
xfs: remove XFS_BMAP_MAX_SHIFT_EXTENTS
The define was always set to 1, which means looping until we reach is was dead code from the start. Also remove an initialization of next_fsb for the done case that doesn't fit the new code flow - it was never checked by the caller in the done case to start with. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 47b53c88de7c..3273f083c496 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1359,14 +1359,9 @@ xfs_collapse_file_space(
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
xfs_defer_init(&dfops, &first_block);
-
- /*
- * We are using the write transaction in which max 2 bmbt
- * updates are allowed
- */
error = xfs_bmap_shift_extents(tp, ip, &next_fsb, shift_fsb,
&done, stop_fsb, &first_block, &dfops,
- SHIFT_LEFT, XFS_BMAP_MAX_SHIFT_EXTENTS);
+ SHIFT_LEFT);
if (error)
goto out_bmap_cancel;
@@ -1438,14 +1433,9 @@ xfs_insert_file_space(
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
xfs_defer_init(&dfops, &first_block);
-
- /*
- * We are using the write transaction in which max 2 bmbt
- * updates are allowed
- */
error = xfs_bmap_shift_extents(tp, ip, &next_fsb, shift_fsb,
&done, stop_fsb, &first_block, &dfops,
- SHIFT_RIGHT, XFS_BMAP_MAX_SHIFT_EXTENTS);
+ SHIFT_RIGHT);
if (error)
goto out_bmap_cancel;