public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Allison Henderson <allison.henderson@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: Initialize error in xfs_attr_remove_iter
Date: Fri, 25 Jun 2021 11:20:16 -0700	[thread overview]
Message-ID: <20210625182016.GA13784@locust> (raw)
In-Reply-To: <20210622210852.9511-1-allison.henderson@oracle.com>

On Tue, Jun 22, 2021 at 02:08:52PM -0700, Allison Henderson wrote:
> A recent bug report generated a warning that a code path in
> xfs_attr_remove_iter could potentially return error uninitialized in the
> case of XFS_DAS_RM_SHRINK state.  Fix this by initializing error.
> 
> Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

Looks good,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/libxfs/xfs_attr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index 611dc67..d9d7d51 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -1375,7 +1375,7 @@ xfs_attr_remove_iter(
>  {
>  	struct xfs_da_args		*args = dac->da_args;
>  	struct xfs_da_state		*state = dac->da_state;
> -	int				retval, error;
> +	int				retval, error = 0;
>  	struct xfs_inode		*dp = args->dp;
>  
>  	trace_xfs_attr_node_removename(args);
> -- 
> 2.7.4
> 

      parent reply	other threads:[~2021-06-25 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 21:08 [PATCH] xfs: Initialize error in xfs_attr_remove_iter Allison Henderson
2021-06-23 10:18 ` Brian Foster
2021-06-23 20:00 ` Bill O'Donnell
2021-06-25 18:20 ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210625182016.GA13784@locust \
    --to=djwong@kernel.org \
    --cc=allison.henderson@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox