nfs: nfs3acl: drop useless assignment in nfs3_get_acl()
Subsystems (2)
PATCH 1/1 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.
---
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(-)
fs/nfs/nfs3acl.c +1 -1
@@ -104,7 +104,7 @@ struct posix_acl *nfs3_get_acl(struct inswitch (status) {case 0 : - status =nfs_refresh_inode (inode, res.fattr); +nfs_refresh_inode (inode, res.fattr);break ;case -EPFNOSUPPORT :case -EPROTONOSUPPORT :
Quoted 9 lines · Sergey Shtylyov
In
nfs3_get_acl(), the local variable status is assigned the result ofnfs_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 <[email protected]>
Ben