]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: restructure xfs_attr_complete_op a bit
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:47:29 +0000 (09:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 14:46:53 +0000 (07:46 -0700)
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>
fs/xfs/libxfs/xfs_attr.c

index 54edc690ac1e15e6100b3a0b0e9b5a06023c3a8b..ba59dab6c56db23dc65fc8ac0d8f499c0e7d31f1 100644 (file)
@@ -432,14 +432,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