]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: restructure xfs_attr_complete_op a bit
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:44 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:01 +0000 (17:01 -0700)
Source kernel commit: 992c3b5c3fe6f42778436649ddae2b7a2984b7aa

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>
libxfs/xfs_attr.c

index 8e9e238369ceda0f3fd1b729b3f00a1d07ac3688..26674116f254aec7b084ab3aac64cc604e689941 100644 (file)
@@ -430,14 +430,13 @@ xfs_attr_complete_op(
        enum xfs_delattr_state  replace_state)
 {
        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->attr_filter &= ~XFS_ATTR_INCOMPLETE;
-       if (do_replace)
-               return replace_state;
-
-       return XFS_DAS_DONE;
+       return replace_state;
 }
 
 static int