diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-11-30 20:47:45 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-12-07 03:45:16 +0100 |
commit | 3e0958be2156d90ef908a1a547b4e27a3ec38da9 (patch) | |
tree | 2d116fb33c148cffe3e143bf2d5594dcd41e9b36 /fs/xfs/libxfs/xfs_defer.c | |
parent | xfs: use xfs_defer_create_done for the relogging operation (diff) | |
download | linux-3e0958be2156d90ef908a1a547b4e27a3ec38da9.tar.xz linux-3e0958be2156d90ef908a1a547b4e27a3ec38da9.zip |
xfs: clean out XFS_LI_DIRTY setting boilerplate from ->iop_relog
Hoist this dirty flag setting to the ->iop_relog callsite to reduce
boilerplate.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_defer.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_defer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c index 63b9960a96e1..aa19ede91a57 100644 --- a/fs/xfs/libxfs/xfs_defer.c +++ b/fs/xfs/libxfs/xfs_defer.c @@ -474,6 +474,8 @@ xfs_defer_relog( ASSERT((*tpp)->t_flags & XFS_TRANS_PERM_LOG_RES); list_for_each_entry(dfp, dfops, dfp_list) { + struct xfs_log_item *lip; + /* * If the log intent item for this deferred op is not a part of * the current log checkpoint, relog the intent item to keep @@ -502,9 +504,12 @@ xfs_defer_relog( XFS_STATS_INC((*tpp)->t_mountp, defer_relog); xfs_defer_create_done(*tpp, dfp); - dfp->dfp_intent = xfs_trans_item_relog(dfp->dfp_intent, - dfp->dfp_done, *tpp); + lip = xfs_trans_item_relog(dfp->dfp_intent, dfp->dfp_done, + *tpp); + if (lip) + set_bit(XFS_LI_DIRTY, &lip->li_flags); dfp->dfp_done = NULL; + dfp->dfp_intent = lip; } if ((*tpp)->t_flags & XFS_TRANS_DIRTY) |