diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-09-12 19:37:06 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-09-13 22:43:42 -0400 |
commit | ed748aacb8e3318fa2cf24e1c197d35b5fd29605 (patch) | |
tree | cee8fdf89ec8019b0dd3cd3e10eca4df05e6c4e5 /fs/nfsd/export.c | |
parent | ee626a77d3725a129391b1c85edd46f3b470cca9 (diff) |
NFSD: Cleanup for nfsd4_path()
The current code is sort of hackish in that it assumes a referral is always
matched to an export. When we add support for junctions that may not be the
case.
We can replace nfsd4_path() with a function that encodes the components
directly from the dentries. Since nfsd4_path is currently the only user of
the 'ex_pathname' field in struct svc_export, this has the added benefit
of allowing us to get rid of that.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index d491421cd708..99229b0c153e 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1009,7 +1009,7 @@ rqst_exp_parent(struct svc_rqst *rqstp, struct path *path) | |||
1009 | return exp; | 1009 | return exp; |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | static struct svc_export *find_fsidzero_export(struct svc_rqst *rqstp) | 1012 | struct svc_export *rqst_find_fsidzero_export(struct svc_rqst *rqstp) |
1013 | { | 1013 | { |
1014 | u32 fsidv[2]; | 1014 | u32 fsidv[2]; |
1015 | 1015 | ||
@@ -1029,7 +1029,7 @@ exp_pseudoroot(struct svc_rqst *rqstp, struct svc_fh *fhp) | |||
1029 | struct svc_export *exp; | 1029 | struct svc_export *exp; |
1030 | __be32 rv; | 1030 | __be32 rv; |
1031 | 1031 | ||
1032 | exp = find_fsidzero_export(rqstp); | 1032 | exp = rqst_find_fsidzero_export(rqstp); |
1033 | if (IS_ERR(exp)) | 1033 | if (IS_ERR(exp)) |
1034 | return nfserrno(PTR_ERR(exp)); | 1034 | return nfserrno(PTR_ERR(exp)); |
1035 | rv = fh_compose(fhp, exp, exp->ex_path.dentry, NULL); | 1035 | rv = fh_compose(fhp, exp, exp->ex_path.dentry, NULL); |