summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_defer.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-11-30 10:58:37 -0800
committerDarrick J. Wong <djwong@kernel.org>2023-12-06 18:45:16 -0800
commitf3fd7f6fce1cc9b8eb59705b27f823330207b7c9 (patch)
treedc60472d1f19e200c67b5e562952fec72008bfd6 /fs/xfs/libxfs/xfs_defer.c
parente6e5299fcbf0b18cad45cd58f99787549c790857 (diff)
xfs: hoist ->create_intent boilerplate to its callsite
Hoist the dirty flag setting code out of each ->create_intent implementation up to the callsite to reduce boilerplate further. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
index 6214abedf394..2871c773a122 100644
--- a/fs/xfs/libxfs/xfs_defer.c
+++ b/fs/xfs/libxfs/xfs_defer.c
@@ -240,6 +240,8 @@ xfs_defer_create_intent(
if (IS_ERR(lip))
return PTR_ERR(lip);
+ tp->t_flags |= XFS_TRANS_DIRTY;
+ set_bit(XFS_LI_DIRTY, &lip->li_flags);
dfp->dfp_intent = lip;
return 1;
}