]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: hoist ->create_intent boilerplate to its callsite
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 23:07:31 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:23 +0000 (14:06 -0700)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
libxfs/xfs_defer.c

index 6a9ce92419c05a141eddad05799476811bd4a8cb..1be9554e1b86f3df90f32076663088622502f48e 100644 (file)
@@ -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;
 }