aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-04-18 03:00:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:00 -0400
commite64c390ca0b60fd2119331ef1fa888d7ea27e424 (patch)
treef1fc964af0abc20b2325cea513cbafdf09537c39 /fs/nfsd/vfs.c
parent91c9fa8f75877c0c1e455c23e8f8206c91c8f77f (diff)
switch rqst_exp_parent()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index d84c4eaa526b..9f1ea3127f5d 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -169,28 +169,29 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
169 /* checking mountpoint crossing is very different when stepping up */ 169 /* checking mountpoint crossing is very different when stepping up */
170 struct svc_export *exp2 = NULL; 170 struct svc_export *exp2 = NULL;
171 struct dentry *dp; 171 struct dentry *dp;
172 struct vfsmount *mnt = mntget(exp->ex_path.mnt); 172 struct path path = {.mnt = mntget(exp->ex_path.mnt),
173 dentry = dget(dparent); 173 .dentry = dget(dparent)};
174 while(dentry == mnt->mnt_root && follow_up(&mnt, &dentry)) 174
175 while (path.dentry == path.mnt->mnt_root &&
176 follow_up(&path.mnt, &path.dentry))
175 ; 177 ;
176 dp = dget_parent(dentry); 178 dp = dget_parent(path.dentry);
177 dput(dentry); 179 dput(path.dentry);
178 dentry = dp; 180 path.dentry = dp;
179 181
180 exp2 = rqst_exp_parent(rqstp, mnt, dentry); 182 exp2 = rqst_exp_parent(rqstp, &path);
181 if (PTR_ERR(exp2) == -ENOENT) { 183 if (PTR_ERR(exp2) == -ENOENT) {
182 dput(dentry);
183 dentry = dget(dparent); 184 dentry = dget(dparent);
184 } else if (IS_ERR(exp2)) { 185 } else if (IS_ERR(exp2)) {
185 host_err = PTR_ERR(exp2); 186 host_err = PTR_ERR(exp2);
186 dput(dentry); 187 path_put(&path);
187 mntput(mnt);
188 goto out_nfserr; 188 goto out_nfserr;
189 } else { 189 } else {
190 dentry = dget(path.dentry);
190 exp_put(exp); 191 exp_put(exp);
191 exp = exp2; 192 exp = exp2;
192 } 193 }
193 mntput(mnt); 194 path_put(&path);
194 } 195 }
195 } else { 196 } else {
196 fh_lock(fhp); 197 fh_lock(fhp);