diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-07-17 07:04:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:07 -0400 |
commit | 0989a7889695831e49e2c53c1884f52645516a90 (patch) | |
tree | f2548a7ebdedbe89121c40c0157f5554093fb0d7 /fs/nfsd/vfs.c | |
parent | 87548c37c8bdbf98aea002c9c04e4dc8aa27fe1b (diff) |
knfsd: nfsd: provide export lookup wrappers which take a svc_rqst
Split the callers of exp_get_by_name(), exp_find(), and exp_parent() into
those that are processing requests and those that are doing other stuff (like
looking up filehandles for mountd).
No change in behavior, just a (fairly pointless, on its own) cleanup.
(Note this has the effect of making nfsd_cross_mnt() pass rqstp->rq_client
instead of exp->ex_client into exp_find_by_name(). However, the two should
have the same value at this point.)
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index ec6aaf8b0e36..65043af232ee 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -113,7 +113,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, | |||
113 | 113 | ||
114 | while (follow_down(&mnt,&mounts)&&d_mountpoint(mounts)); | 114 | while (follow_down(&mnt,&mounts)&&d_mountpoint(mounts)); |
115 | 115 | ||
116 | exp2 = exp_get_by_name(exp->ex_client, mnt, mounts, &rqstp->rq_chandle); | 116 | exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts); |
117 | if (IS_ERR(exp2)) { | 117 | if (IS_ERR(exp2)) { |
118 | err = PTR_ERR(exp2); | 118 | err = PTR_ERR(exp2); |
119 | dput(mounts); | 119 | dput(mounts); |
@@ -188,8 +188,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, | |||
188 | dput(dentry); | 188 | dput(dentry); |
189 | dentry = dp; | 189 | dentry = dp; |
190 | 190 | ||
191 | exp2 = exp_parent(exp->ex_client, mnt, dentry, | 191 | exp2 = rqst_exp_parent(rqstp, mnt, dentry); |
192 | &rqstp->rq_chandle); | ||
193 | if (PTR_ERR(exp2) == -ENOENT) { | 192 | if (PTR_ERR(exp2) == -ENOENT) { |
194 | dput(dentry); | 193 | dput(dentry); |
195 | dentry = dget(dparent); | 194 | dentry = dget(dparent); |