diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-04-22 18:47:29 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-04-23 16:46:53 +0200 |
commit | 992c3b5c3fe6f42778436649ddae2b7a2984b7aa (patch) | |
tree | 8b002122e17c17b1632a776febf9b81505555bb4 /fs/xfs/libxfs/xfs_attr.c | |
parent | xfs: check shortform attr entry flags specifically (diff) | |
download | linux-992c3b5c3fe6f42778436649ddae2b7a2984b7aa.tar.xz linux-992c3b5c3fe6f42778436649ddae2b7a2984b7aa.zip |
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_attr.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_attr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c index 54edc690ac1e..ba59dab6c56d 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -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 |