From: Darrick J. Wong Date: Mon, 29 Jul 2024 23:22:44 +0000 (-0700) Subject: xfs: restructure xfs_attr_complete_op a bit X-Git-Tag: v6.10.0~24^2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc63a9f25a04420cfd601c068ed45aec32f05c4e;p=thirdparty%2Fxfsprogs-dev.git xfs: restructure xfs_attr_complete_op a bit 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 Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 8e9e2383..26674116 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -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