From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Anna Schumaker <anna@kernel.org>, <linux-nfs@vger.kernel.org>,
Trond Myklebust <trondmy@kernel.org>
Cc: <lvc-project@linuxtesting.org>
Subject: [PATCH] nfs: nfs3acl: drop useless assignment in nfs3_get_acl()
Date: Wed, 9 Apr 2025 23:36:33 +0300 [thread overview]
Message-ID: <c32dced7-a4fa-43c0-aafe-ef6c819c2f91@omp.ru> (raw)
In nfs3_get_acl(), the local variable status is assigned the result of
nfs_refresh_inode() inside the *switch* statement, but that value gets
overwritten in the next *if* statement's true branch and is completely
ignored if that branch isn't taken...
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
This patch is against the linux-next branch of Trond Myklebust's linux-nfs.git
repo.
fs/nfs/nfs3acl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-nfs/fs/nfs/nfs3acl.c
===================================================================
--- linux-nfs.orig/fs/nfs/nfs3acl.c
+++ linux-nfs/fs/nfs/nfs3acl.c
@@ -104,7 +104,7 @@ struct posix_acl *nfs3_get_acl(struct in
switch (status) {
case 0:
- status = nfs_refresh_inode(inode, res.fattr);
+ nfs_refresh_inode(inode, res.fattr);
break;
case -EPFNOSUPPORT:
case -EPROTONOSUPPORT:
next reply other threads:[~2025-04-09 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 20:36 Sergey Shtylyov [this message]
2025-04-11 11:02 ` [PATCH] nfs: nfs3acl: drop useless assignment in nfs3_get_acl() Benjamin Coddington
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=c32dced7-a4fa-43c0-aafe-ef6c819c2f91@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=anna@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=trondmy@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