diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-04-18 03:00:46 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:00 -0400 |
commit | e64c390ca0b60fd2119331ef1fa888d7ea27e424 (patch) | |
tree | f1fc964af0abc20b2325cea513cbafdf09537c39 /fs/nfsd/export.c | |
parent | 91c9fa8f75877c0c1e455c23e8f8206c91c8f77f (diff) |
switch rqst_exp_parent()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 84f5e5cb0863..8b1f8efb4690 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1299,24 +1299,19 @@ gss: | |||
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | struct svc_export * | 1301 | struct svc_export * |
1302 | rqst_exp_parent(struct svc_rqst *rqstp, struct vfsmount *mnt, | 1302 | rqst_exp_parent(struct svc_rqst *rqstp, struct path *path) |
1303 | struct dentry *dentry) | ||
1304 | { | 1303 | { |
1305 | struct svc_export *exp; | 1304 | struct dentry *saved = dget(path->dentry); |
1306 | struct path path = {.mnt = mnt, .dentry = dentry}; | 1305 | struct svc_export *exp = rqst_exp_get_by_name(rqstp, path); |
1307 | |||
1308 | dget(dentry); | ||
1309 | exp = rqst_exp_get_by_name(rqstp, &path); | ||
1310 | |||
1311 | while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(dentry)) { | ||
1312 | struct dentry *parent; | ||
1313 | 1306 | ||
1314 | parent = dget_parent(dentry); | 1307 | while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) { |
1315 | dput(dentry); | 1308 | struct dentry *parent = dget_parent(path->dentry); |
1316 | dentry = parent; | 1309 | dput(path->dentry); |
1317 | exp = rqst_exp_get_by_name(rqstp, &path); | 1310 | path->dentry = parent; |
1311 | exp = rqst_exp_get_by_name(rqstp, path); | ||
1318 | } | 1312 | } |
1319 | dput(dentry); | 1313 | dput(path->dentry); |
1314 | path->dentry = saved; | ||
1320 | return exp; | 1315 | return exp; |
1321 | } | 1316 | } |
1322 | 1317 | ||