switch rqst_exp_parent()
[deliverable/linux.git] / fs / nfsd / export.c
index 84f5e5cb0863704eb307dc04f72f03034fdfa0aa..8b1f8efb4690e2f9271adac75ad71a54c4198fe3 100644 (file)
@@ -1299,24 +1299,19 @@ gss:
 }
 
 struct svc_export *
-rqst_exp_parent(struct svc_rqst *rqstp, struct vfsmount *mnt,
-               struct dentry *dentry)
+rqst_exp_parent(struct svc_rqst *rqstp, struct path *path)
 {
-       struct svc_export *exp;
-       struct path path = {.mnt = mnt, .dentry = dentry};
-
-       dget(dentry);
-       exp = rqst_exp_get_by_name(rqstp, &path);
-
-       while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(dentry)) {
-               struct dentry *parent;
+       struct dentry *saved = dget(path->dentry);
+       struct svc_export *exp = rqst_exp_get_by_name(rqstp, path);
 
-               parent = dget_parent(dentry);
-               dput(dentry);
-               dentry = parent;
-               exp = rqst_exp_get_by_name(rqstp, &path);
+       while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) {
+               struct dentry *parent = dget_parent(path->dentry);
+               dput(path->dentry);
+               path->dentry = parent;
+               exp = rqst_exp_get_by_name(rqstp, path);
        }
-       dput(dentry);
+       dput(path->dentry);
+       path->dentry = saved;
        return exp;
 }
 
This page took 0.026176 seconds and 5 git commands to generate.