forked from Minki/linux
Revert "nfsd4: fix error return when pseudoroot missing"
Commitf39bde24b2
fixed the error return from PUTROOTFH in the case where there is no pseudofilesystem. This is really a case we shouldn't hit on a correctly configured server: in the absence of a root filehandle, there's no point accepting version 4 NFS rpc calls at all. But the shared responsibility between kernel and userspace here means the kernel on its own can't eliminate the possiblity of this happening. And we have indeed gotten this wrong in distro's, so new client-side mount code that attempts to negotiate v4 by default first has to work around this case. Therefore when commitf39bde24b2
arrived at roughly the same time as the new v4-default mount code, which explicitly checked only for the previous error, the result was previously fine mounts suddenly failing. We'll fix both sides for now: revert the error change, and make the client-side mount workaround more robust. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
b292cf9ce7
commit
260c64d235
@ -1316,19 +1316,11 @@ rqst_exp_parent(struct svc_rqst *rqstp, struct path *path)
|
||||
|
||||
static struct svc_export *find_fsidzero_export(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct svc_export *exp;
|
||||
u32 fsidv[2];
|
||||
|
||||
mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL);
|
||||
|
||||
exp = rqst_exp_find(rqstp, FSID_NUM, fsidv);
|
||||
/*
|
||||
* We shouldn't have accepting an nfsv4 request at all if we
|
||||
* don't have a pseudoexport!:
|
||||
*/
|
||||
if (IS_ERR(exp) && PTR_ERR(exp) == -ENOENT)
|
||||
exp = ERR_PTR(-ESERVERFAULT);
|
||||
return exp;
|
||||
return rqst_exp_find(rqstp, FSID_NUM, fsidv);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user