Commit 16df68d1 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kNFSd: Fix for lookup-parent at pseudo root

From: NeilBrown <neilb@cse.unsw.edu.au>

tests if current_fh is the pseudo root for the client and returns
nfserr_noent if so.  need to call exp_pseudoroot because different clients
can have
parent 62c4f3f6
...@@ -349,14 +349,18 @@ nfsd4_link(struct svc_rqst *rqstp, struct svc_fh *current_fh, ...@@ -349,14 +349,18 @@ nfsd4_link(struct svc_rqst *rqstp, struct svc_fh *current_fh,
static inline int static inline int
nfsd4_lookupp(struct svc_rqst *rqstp, struct svc_fh *current_fh) nfsd4_lookupp(struct svc_rqst *rqstp, struct svc_fh *current_fh)
{ {
/* struct svc_fh tmp_fh;
* XXX: We currently violate the spec in one small respect int ret;
* here. If LOOKUPP is done at the root of the pseudofs,
* the spec requires us to return NFSERR_NOENT. Personally, fh_init(&tmp_fh, NFS4_FHSIZE);
* I think that leaving the filehandle unchanged is more if((ret = exp_pseudoroot(rqstp->rq_client, &tmp_fh,
* logical, but this is an academic question anyway, since &rqstp->rq_chandle)) != 0)
* no clients actually use LOOKUPP. return ret;
*/ if (tmp_fh.fh_dentry == current_fh->fh_dentry) {
fh_put(&tmp_fh);
return nfserr_noent;
}
fh_put(&tmp_fh);
return nfsd_lookup(rqstp, current_fh, "..", 2, current_fh); return nfsd_lookup(rqstp, current_fh, "..", 2, current_fh);
} }
......
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