All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Henderson <allison.henderson@oracle.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [bug report] xfs: Add delay ready attr remove routines
Date: Tue, 22 Jun 2021 00:59:31 -0700	[thread overview]
Message-ID: <c4aca634-7a63-015a-1c2c-245b47e2ebd9@oracle.com> (raw)
In-Reply-To: <YMtaw9vsW69xGseU@mwanda>



On 6/17/21 7:22 AM, Dan Carpenter wrote:
> Hello Allison Henderson,
> 
> The patch 2b74b03c13c4: "xfs: Add delay ready attr remove routines"
> from Apr 26, 2021, leads to the following static checker warning:
> 
> 	fs/xfs/libxfs/xfs_attr.c:1481 xfs_attr_remove_iter()
> 	error: uninitialized symbol 'error'.
> 
> fs/xfs/libxfs/xfs_attr.c
>    1469                          return -EAGAIN;
>    1470                  }
>    1471
>    1472                  /* fallthrough */
>    1473          case XFS_DAS_RM_SHRINK:
>    1474                  /*
>    1475                   * If the result is small enough, push it all into the inode.
>    1476                   * This is our final state so it's safe to return a dirty
>    1477                   * transaction.
>    1478                   */
>    1479                  if (xfs_attr_is_leaf(dp))
>    1480                          error = xfs_attr_node_shrink(args, state);
>    1481                  ASSERT(error != -EAGAIN);
> 
> Not initialized on the else path.  It should be zero right?
Hi Dan,

Thanks for the catch, I just noticed this report.  I will sent out a 
patch initializing error at the start of the function.  That should take 
care of this warning.

Thx!
Allison
> 
>    1482                  break;
>    1483          default:
>    1484                  ASSERT(0);
>    1485                  error = -EINVAL;
>    1486                  goto out;
>    1487          }
>    1488  out:
>    1489          if (state)
>    1490                  xfs_da_state_free(state);
>    1491          return error;
>                  ^^^^^^^^^^^^
> returned here.
> 
>    1492  }
> 
> regards,
> dan carpenter
> 

      reply	other threads:[~2021-06-22  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 14:22 [bug report] xfs: Add delay ready attr remove routines Dan Carpenter
2021-06-22  7:59 ` Allison Henderson [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=c4aca634-7a63-015a-1c2c-245b47e2ebd9@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=dan.carpenter@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.