From: Darrick J. Wong Date: Thu, 12 Nov 2020 22:20:57 +0000 (-0500) Subject: xfs: remove xfs_defer_reset X-Git-Tag: v5.10.0-rc0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=843471436f423a16c72455f76df6832951af9c51;p=thirdparty%2Fxfsprogs-dev.git xfs: remove xfs_defer_reset Source kernel commit: b80b29d602a8879829fbf89115e9e6877806a2da Remove this one-line helper since the assert is trivially true in one call site and the rest obscures a bitmask operation. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c index 1d1eac62d..4f844b046 100644 --- a/libxfs/xfs_defer.c +++ b/libxfs/xfs_defer.c @@ -310,22 +310,6 @@ xfs_defer_trans_roll( return error; } -/* - * Reset an already used dfops after finish. - */ -static void -xfs_defer_reset( - struct xfs_trans *tp) -{ - ASSERT(list_empty(&tp->t_dfops)); - - /* - * Low mode state transfers across transaction rolls to mirror dfops - * lifetime. Clear it now that dfops is reset. - */ - tp->t_flags &= ~XFS_TRANS_LOWMODE; -} - /* * Free up any items left in the list. */ @@ -475,7 +459,10 @@ xfs_defer_finish( return error; } } - xfs_defer_reset(*tp); + + /* Reset LOWMODE now that we've finished all the dfops. */ + ASSERT(list_empty(&(*tp)->t_dfops)); + (*tp)->t_flags &= ~XFS_TRANS_LOWMODE; return 0; } @@ -549,8 +536,7 @@ xfs_defer_move( * that behavior. */ dtp->t_flags |= (stp->t_flags & XFS_TRANS_LOWMODE); - - xfs_defer_reset(stp); + stp->t_flags &= ~XFS_TRANS_LOWMODE; } /*