summaryrefslogtreecommitdiff
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-10-02 02:00:00 +0300
committerJ. Bruce Fields <bfields@redhat.com>2020-10-02 16:37:42 +0300
commit4b74fd793a77f6149d68dbf95574311af9506e39 (patch)
treea9dc7b3418f183e5706ff572860483db563ca115 /fs/nfsd/export.c
parent14168d678a0fa0645609417ad9c384a7c6f895fd (diff)
downloadlinux-4b74fd793a77f6149d68dbf95574311af9506e39.tar.xz
NFSD: Map nfserr_wrongsec outside of nfsd_dispatch
Refactor: Handle this NFS version-specific mapping in the only place where nfserr_wrongsec is generated. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index cb777fe82988..21e404e7cb68 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1002,7 +1002,7 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp)
if (nfsd4_spo_must_allow(rqstp))
return 0;
- return nfserr_wrongsec;
+ return rqstp->rq_vers < 4 ? nfserr_acces : nfserr_wrongsec;
}
/*