summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2025-04-09 23:36:33 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2025-04-27 23:25:44 -0400
commitc367eea5041c2e5ef6836fe0ba8c5dc75a965b1b (patch)
treee21335f22d1c1f9d0b9c2cbc24b2dd132b6bfb76 /fs/nfs
parentd82e86c15364d42706eb8b5249640a839d61a681 (diff)
nfs: nfs3acl: drop useless assignment in nfs3_get_acl()
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> Link: https://lore.kernel.org/r/c32dced7-a4fa-43c0-aafe-ef6c819c2f91@omp.ru Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs3acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
index 18d8f6529f61..a126eb31f62f 100644
--- a/fs/nfs/nfs3acl.c
+++ b/fs/nfs/nfs3acl.c
@@ -104,7 +104,7 @@ struct posix_acl *nfs3_get_acl(struct inode *inode, int type, bool rcu)
switch (status) {
case 0:
- status = nfs_refresh_inode(inode, res.fattr);
+ nfs_refresh_inode(inode, res.fattr);
break;
case -EPFNOSUPPORT:
case -EPROTONOSUPPORT: