Skip to content

Commit c367eea

Browse files
Sergey ShtylyovTrond Myklebust
authored andcommitted
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>
1 parent d82e86c commit c367eea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/nfs3acl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct posix_acl *nfs3_get_acl(struct inode *inode, int type, bool rcu)
104104

105105
switch (status) {
106106
case 0:
107-
status = nfs_refresh_inode(inode, res.fattr);
107+
nfs_refresh_inode(inode, res.fattr);
108108
break;
109109
case -EPFNOSUPPORT:
110110
case -EPROTONOSUPPORT:

0 commit comments

Comments
 (0)