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>
This commit is contained in:

committed by
Darrick J. Wong

parent
4ed36c6b09
commit
6b18af0dfd
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user