xfs: restructure xfs_attr_complete_op a bit

Eliminate the local variable from this function so that we can
streamline things a bit later when we add the PPTR_REPLACE op code.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Darrick J. Wong 2024-04-22 09:47:29 -07:00
parent 309dc9cbbb
commit 992c3b5c3f

View File

@ -432,14 +432,13 @@ xfs_attr_complete_op(
enum xfs_delattr_state replace_state) enum xfs_delattr_state replace_state)
{ {
struct xfs_da_args *args = attr->xattri_da_args; struct xfs_da_args *args = attr->xattri_da_args;
bool do_replace = args->op_flags & XFS_DA_OP_REPLACE;
if (!(args->op_flags & XFS_DA_OP_REPLACE))
replace_state = XFS_DAS_DONE;
args->op_flags &= ~XFS_DA_OP_REPLACE; args->op_flags &= ~XFS_DA_OP_REPLACE;
args->attr_filter &= ~XFS_ATTR_INCOMPLETE; args->attr_filter &= ~XFS_ATTR_INCOMPLETE;
if (do_replace) return replace_state;
return replace_state;
return XFS_DAS_DONE;
} }
static int static int