diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-10-10 21:24:23 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-11-28 12:54:44 -0500 |
commit | 69eed23baf877bbb1f14d7f4df54f89807c9ee2a (patch) | |
tree | b7f8a8ba52c299b093b57cf9e35a68e75adfc4dd /fs/nfsd | |
parent | eeadcb75794516839078c28b3730132aeb700ce6 (diff) | |
download | linux-69eed23baf877bbb1f14d7f4df54f89807c9ee2a.tar.gz linux-69eed23baf877bbb1f14d7f4df54f89807c9ee2a.tar.bz2 linux-69eed23baf877bbb1f14d7f4df54f89807c9ee2a.zip |
NFSD: Remove redundant assignment to variable host_err
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/vfs.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 849a720ab43f..d6d90d63485d 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -1305,7 +1305,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(&init_user_ns, dirp, dchild, iap->ia_mode, true); |