* [PATCH] nfs: nfs3acl: drop useless assignment in nfs3_get_acl()
@ 2025-04-09 20:36 Sergey Shtylyov
2025-04-11 11:02 ` Benjamin Coddington
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2025-04-09 20:36 UTC (permalink / raw)
To: Anna Schumaker, linux-nfs, Trond Myklebust; +Cc: lvc-project
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:
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] nfs: nfs3acl: drop useless assignment in nfs3_get_acl()
2025-04-09 20:36 [PATCH] nfs: nfs3acl: drop useless assignment in nfs3_get_acl() Sergey Shtylyov
@ 2025-04-11 11:02 ` Benjamin Coddington
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Coddington @ 2025-04-11 11:02 UTC (permalink / raw)
To: Sergey Shtylyov; +Cc: Anna Schumaker, linux-nfs, Trond Myklebust, lvc-project
On 9 Apr 2025, at 16:36, Sergey Shtylyov wrote:
> 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>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Ben
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-11 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 20:36 [PATCH] nfs: nfs3acl: drop useless assignment in nfs3_get_acl() Sergey Shtylyov
2025-04-11 11:02 ` Benjamin Coddington
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox