Commit 4b74fd79 authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 14168d67
...@@ -1002,7 +1002,7 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp) ...@@ -1002,7 +1002,7 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp)
if (nfsd4_spo_must_allow(rqstp)) if (nfsd4_spo_must_allow(rqstp))
return 0; return 0;
return nfserr_wrongsec; return rqstp->rq_vers < 4 ? nfserr_acces : nfserr_wrongsec;
} }
/* /*
......
...@@ -964,8 +964,6 @@ static __be32 map_new_errors(u32 vers, __be32 nfserr) ...@@ -964,8 +964,6 @@ static __be32 map_new_errors(u32 vers, __be32 nfserr)
{ {
if (nfserr == nfserr_jukebox && vers == 2) if (nfserr == nfserr_jukebox && vers == 2)
return nfserr_dropit; return nfserr_dropit;
if (nfserr == nfserr_wrongsec && vers < 4)
return nfserr_acces;
return nfserr; return nfserr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment