summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_item.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-05-01 16:00:55 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-08 08:50:01 -0700
commitcc560a5a9540be2d907c0c170e29ebde98d13d63 (patch)
treed284a26b972247375195c4bc9f3c028d71e25ea2 /fs/xfs/xfs_bmap_item.c
parent96b60f826713767f222254418c995fb6fd7596b3 (diff)
xfs: hoist setting of XFS_LI_RECOVERED to caller
The only purpose of XFS_LI_RECOVERED is to prevent log recovery from trying to replay recovered intents more than once. Therefore, we can move the bit setting up to the ->iop_recover caller. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_bmap_item.c')
-rw-r--r--fs/xfs/xfs_bmap_item.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index 3b8ca4409aa5..6736c5ab188f 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -442,11 +442,8 @@ xfs_bui_item_recover(
int whichfork;
int error = 0;
- ASSERT(!test_bit(XFS_LI_RECOVERED, &buip->bui_item.li_flags));
-
/* Only one mapping operation per BUI... */
if (buip->bui_format.bui_nextents != XFS_BUI_MAX_FAST_EXTENTS) {
- set_bit(XFS_LI_RECOVERED, &buip->bui_item.li_flags);
xfs_bui_release(buip);
return -EFSCORRUPTED;
}
@@ -480,7 +477,6 @@ xfs_bui_item_recover(
* This will pull the BUI from the AIL and
* free the memory associated with it.
*/
- set_bit(XFS_LI_RECOVERED, &buip->bui_item.li_flags);
xfs_bui_release(buip);
return -EFSCORRUPTED;
}
@@ -538,7 +534,6 @@ xfs_bui_item_recover(
xfs_bmap_unmap_extent(tp, ip, &irec);
}
- set_bit(XFS_LI_RECOVERED, &buip->bui_item.li_flags);
xfs_defer_move(parent_tp, tp);
error = xfs_trans_commit(tp);
xfs_iunlock(ip, XFS_ILOCK_EXCL);