From: Darrick J. Wong Date: Mon, 15 Apr 2024 23:07:31 +0000 (-0700) Subject: xfs: hoist ->create_intent boilerplate to its callsite X-Git-Tag: v6.8.0~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63a3ea39f6a0b212ef59e27356a39bfbac294a4d;p=thirdparty%2Fxfsprogs-dev.git xfs: hoist ->create_intent boilerplate to its callsite Source kernel commit: f3fd7f6fce1cc9b8eb59705b27f823330207b7c9 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 Reviewed-by: Christoph Hellwig Reviewed-by: Bill O'Donnell --- diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c index 6a9ce924..1be9554e 100644 --- a/libxfs/xfs_defer.c +++ b/libxfs/xfs_defer.c @@ -235,6 +235,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; }