Commit b80b29d6 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: remove xfs_defer_reset

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: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent 67145967
...@@ -312,22 +312,6 @@ xfs_defer_trans_roll( ...@@ -312,22 +312,6 @@ xfs_defer_trans_roll(
return error; 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. * Free up any items left in the list.
*/ */
...@@ -477,7 +461,10 @@ xfs_defer_finish( ...@@ -477,7 +461,10 @@ xfs_defer_finish(
return error; 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; return 0;
} }
...@@ -551,8 +538,7 @@ xfs_defer_move( ...@@ -551,8 +538,7 @@ xfs_defer_move(
* that behavior. * that behavior.
*/ */
dtp->t_flags |= (stp->t_flags & XFS_TRANS_LOWMODE); dtp->t_flags |= (stp->t_flags & XFS_TRANS_LOWMODE);
stp->t_flags &= ~XFS_TRANS_LOWMODE;
xfs_defer_reset(stp);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment