mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:30:52 +07:00
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>
This commit is contained in:
parent
14168d678a
commit
4b74fd793a
@ -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)
|
|||||||
{
|
{
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user