summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-04-18 02:14:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:00 -0400
commit5bf3bd2b5cb68ba43c91f5bd0ac043543fba2558 (patch)
treea8804b29b2e025a2d0f5a81d5f286b2c5d3fd84e /fs/nfsd
parent55430e2ecee574e729c12d4063b3ecabfa98fa82 (diff)
downloadkernel-crypto-5bf3bd2b5cb68ba43c91f5bd0ac043543fba2558.tar.gz
kernel-crypto-5bf3bd2b5cb68ba43c91f5bd0ac043543fba2558.tar.xz
kernel-crypto-5bf3bd2b5cb68ba43c91f5bd0ac043543fba2558.zip
switch exp_parent() to struct path
... and lose the always-NULL last argument (non-NULL case had been split off a while ago). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 3f6d51b8c3e..5149dabde55 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -871,23 +871,19 @@ static svc_export *exp_get_by_name(svc_client *clp, const struct path *path,
/*
* Find the export entry for a given dentry.
*/
-static struct svc_export *exp_parent(svc_client *clp, struct vfsmount *mnt,
- struct dentry *dentry,
- struct cache_req *reqp)
+static struct svc_export *exp_parent(svc_client *clp, struct path *path)
{
- struct path path = {.mnt = mnt, .dentry = dentry};
- svc_export *exp;
-
- dget(path.dentry);
- exp = exp_get_by_name(clp, &path, reqp);
-
- while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path.dentry)) {
- struct dentry *parent = dget_parent(path.dentry);
- dput(path.dentry);
- path.dentry = parent;
- exp = exp_get_by_name(clp, &path, reqp);
+ struct dentry *saved = dget(path->dentry);
+ svc_export *exp = exp_get_by_name(clp, path, NULL);
+
+ while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) {
+ struct dentry *parent = dget_parent(path->dentry);
+ dput(path->dentry);
+ path->dentry = parent;
+ exp = exp_get_by_name(clp, path, NULL);
}
- dput(path.dentry);
+ dput(path->dentry);
+ path->dentry = saved;
return exp;
}
@@ -1174,7 +1170,7 @@ exp_rootfh(svc_client *clp, char *name, struct knfsd_fh *f, int maxsize)
dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%ld)\n",
name, path.dentry, clp->name,
inode->i_sb->s_id, inode->i_ino);
- exp = exp_parent(clp, path.mnt, path.dentry, NULL);
+ exp = exp_parent(clp, &path);
if (IS_ERR(exp)) {
err = PTR_ERR(exp);
goto out;