diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2003-05-20 06:20:49 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-20 06:20:49 -0700 |
| commit | ecdb306381de9308a484c29b28c03e2686aa00ae (patch) | |
| tree | 2825d144c7dffce41fb92f7067f8af3063063f3d | |
| parent | 448d25b80b05679c2d70438530b9cff354eb3d7a (diff) | |
[PATCH] kNFSd: Allow request for nfsv4 pseudo root to perform an upcall.
Most cache-lookups to find export information will cause
an upcall, but currently the lookup to find the pseudo root
for nfsv4 wont asthe cache-handle isn't made available.
This patch makes it available and makes sure that if the
upcall is made, the request is dropped (for now).
| -rw-r--r-- | fs/nfsd/export.c | 10 | ||||
| -rw-r--r-- | fs/nfsd/nfs4proc.c | 3 | ||||
| -rw-r--r-- | include/linux/nfsd/export.h | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index b55bb8eb3ceb..5411f9b7f8c6 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -848,12 +848,18 @@ out: * export point with fsid==0 */ int -exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp) +exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp, + struct cache_req *creq) { struct svc_expkey *fsid_key; int rv; + u32 fsidv[2]; + + mk_fsid_v1(fsidv, 0); - fsid_key = exp_get_fsid_key(clp, 0); + fsid_key = exp_find_key(clp, 1, fsidv, creq); + if (IS_ERR(fsid_key) && PTR_ERR(fsid_key) == -EAGAIN) + return nfserr_dropit; if (!fsid_key || IS_ERR(fsid_key)) return nfserr_perm; diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index f94e2c2c54e8..0568af67b3f8 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -179,7 +179,8 @@ static inline int nfsd4_putrootfh(struct svc_rqst *rqstp, struct svc_fh *current_fh) { fh_put(current_fh); - return exp_pseudoroot(rqstp->rq_client, current_fh); + return exp_pseudoroot(rqstp->rq_client, current_fh, + &rqstp->rq_chandle); } static inline int diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 48860ac34dae..5b44c7892810 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h @@ -100,7 +100,7 @@ struct svc_export * exp_parent(struct auth_domain *clp, struct cache_req *reqp); int exp_rootfh(struct auth_domain *, char *path, struct knfsd_fh *, int maxsize); -int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp); +int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); int nfserrno(int errno); extern void expkey_put(struct cache_head *item, struct cache_detail *cd); |
