diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-10-02 01:59:49 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2020-10-02 16:37:42 +0300 |
commit | f0af22101d9072c6488b8d20d6e33338669029fe (patch) | |
tree | d0307fde97f60b3b60c6121dd319deec5f4dcf45 /fs/nfsd/nfssvc.c | |
parent | 1841b9b61492e35234bdca8a5737a0e5df770f27 (diff) | |
download | linux-f0af22101d9072c6488b8d20d6e33338669029fe.tar.xz |
NFSD: Call NFSv2 encoders on error returns
Remove special dispatcher logic for NFSv2 error responses. These are
rare to the point of becoming extinct, but all NFS responses have to
pay the cost of the extra conditional branches.
With this change, the NFSv2 error cases now get proper
xdr_ressize_check() calls.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index e793344227c9..4aa8db879ca2 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -1056,12 +1056,8 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) if (rqstp->rq_proc != 0) *nfserrp++ = nfserr; - /* - * For NFSv2, additional info is never returned in case of an error. - */ - if (!(nfserr && rqstp->rq_vers == 2)) - if (!proc->pc_encode(rqstp, nfserrp)) - goto out_encode_err; + if (!proc->pc_encode(rqstp, nfserrp)) + goto out_encode_err; nfsd_cache_update(rqstp, rqstp->rq_cachetype, statp + 1); out_cached_reply: |