diff mbox series

[v2,09/11] NFSD: Set *statp in success path

Message ID 160138826463.2558.7846998437714554728.stgit@klimt.1015granger.net (mailing list archive)
State New, archived
Headers show
Series nfsd_dispatch() clean up | expand

Commit Message

Chuck Lever III Sept. 29, 2020, 2:04 p.m. UTC
*statp is supposed to be set in every path through nfsd_dispatch().
The success case appears to leave *statp uninitialized.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/nfssvc.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 283d29ecae43..08776b44cde6 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -1065,6 +1065,7 @@  int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
 
 	nfsd_cache_update(rqstp, rqstp->rq_cachetype, statp + 1);
 out_cached_reply:
+	*statp = rpc_success;
 	return 1;
 
 out_too_large: