summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJ.Bruce Fields <bfields@fieldses.org>2006-10-04 02:16:09 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:19 -0700
commitf38b20c64519bb812a49b9ef4e10d90367a5af5c (patch)
tree84aae3534f4c1d00e56bac39adab2b8b1d530b91 /fs
parent8f8e05c5708d7e9017c47f395f8b1498f7f52922 (diff)
[PATCH] knfsd: nfsd4: refactor exp_pseudoroot
We could be using more common code in exp_pseudoroot(). This will also simplify some changes we need to make later. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/export.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index cfe141e5d759..ac5149d25372 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1048,30 +1048,24 @@ int
exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp,
struct cache_req *creq)
{
- struct svc_expkey *fsid_key;
struct svc_export *exp;
int rv;
u32 fsidv[2];
mk_fsid_v1(fsidv, 0);
- fsid_key = exp_find_key(clp, 1, fsidv, creq);
- if (IS_ERR(fsid_key) && PTR_ERR(fsid_key) == -EAGAIN)
+ exp = exp_find(clp, 1, fsidv, creq);
+ if (IS_ERR(exp) && PTR_ERR(exp) == -EAGAIN)
return nfserr_dropit;
- if (!fsid_key || IS_ERR(fsid_key))
- return nfserr_perm;
-
- exp = exp_get_by_name(clp, fsid_key->ek_mnt, fsid_key->ek_dentry, creq);
if (exp == NULL)
rv = nfserr_perm;
else if (IS_ERR(exp))
rv = nfserrno(PTR_ERR(exp));
else {
rv = fh_compose(fhp, exp,
- fsid_key->ek_dentry, NULL);
+ exp->ex_dentry, NULL);
exp_put(exp);
}
- cache_put(&fsid_key->h, &svc_expkey_cache);
return rv;
}