From: NeilBrown 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 --- 25-akpm/fs/nfsd/nfs4proc.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff -puN fs/nfsd/nfs4proc.c~knfsd-lookup_parent-fix fs/nfsd/nfs4proc.c --- 25/fs/nfsd/nfs4proc.c~knfsd-lookup_parent-fix Mon Feb 23 16:33:47 2004 +++ 25-akpm/fs/nfsd/nfs4proc.c Mon Feb 23 16:33:47 2004 @@ -349,14 +349,18 @@ nfsd4_link(struct svc_rqst *rqstp, struc static inline int nfsd4_lookupp(struct svc_rqst *rqstp, struct svc_fh *current_fh) { - /* - * XXX: We currently violate the spec in one small respect - * here. If LOOKUPP is done at the root of the pseudofs, - * the spec requires us to return NFSERR_NOENT. Personally, - * I think that leaving the filehandle unchanged is more - * logical, but this is an academic question anyway, since - * no clients actually use LOOKUPP. - */ + struct svc_fh tmp_fh; + int ret; + + fh_init(&tmp_fh, NFS4_FHSIZE); + if((ret = exp_pseudoroot(rqstp->rq_client, &tmp_fh, + &rqstp->rq_chandle)) != 0) + 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); } _