diff mbox series

[9/9] NFSD: Set *statp in success path

Message ID 160105324081.19706.8622937614272635909.stgit@klimt.1015granger.net
State New
Headers show
Series nfsd_dispatch() clean up | expand

Commit Message

Chuck Lever Sept. 25, 2020, 5 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 d389b276aa5e..2117cc70b493 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -1063,6 +1063,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: