summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-10-10 21:24:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-21 14:54:04 +0200
commit1dd04600f62953390e6f35827e49b0662ecd2e65 (patch)
tree54af08d1a3170d954ce9debc1222625af8c0c025
parent48a237cb5e52106e111a3afbe61d2e7bb5c1f49f (diff)
downloadlinux-stable-1dd04600f62953390e6f35827e49b0662ecd2e65.tar.gz
linux-stable-1dd04600f62953390e6f35827e49b0662ecd2e65.tar.bz2
linux-stable-1dd04600f62953390e6f35827e49b0662ecd2e65.zip
NFSD: Remove redundant assignment to variable host_err
[ Upstream commit 69eed23baf877bbb1f14d7f4df54f89807c9ee2a ] Variable host_err is assigned a value that is never read, it is being re-assigned a value in every different execution path in the following switch statement. The assignment is redundant and can be removed. Cleans up clang-scan warning: warning: Value stored to 'host_err' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/nfsd/vfs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 4ff626c912cc..aae81c5cecb9 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1322,7 +1322,6 @@ nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
iap->ia_mode &= ~current_umask();
err = 0;
- host_err = 0;
switch (type) {
case S_IFREG:
host_err = vfs_create(dirp, dchild, iap->ia_mode, true);