aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-04-18 03:26:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:00 -0400
commitbab77ebf51e3902f608ecf08c9d34a0a52ac35a9 (patch)
tree710a8bba0a4f3738b32e4e5230ccf3665cd1b815
parente64c390ca0b60fd2119331ef1fa888d7ea27e424 (diff)
switch follow_up() to struct path
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/autofs4/dev-ioctl.c2
-rw-r--r--fs/namei.c16
-rw-r--r--fs/nfsd/vfs.c2
-rw-r--r--include/linux/namei.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index f71dac9986f0..670407576b25 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -212,7 +212,7 @@ static int find_autofs_mount(const char *pathname,
212 err = 0; 212 err = 0;
213 } 213 }
214 } 214 }
215 if (!follow_up(&path.mnt, &path.dentry)) 215 if (!follow_up(&path))
216 break; 216 break;
217 } 217 }
218 path_put(&path); 218 path_put(&path);
diff --git a/fs/namei.c b/fs/namei.c
index 4379ef989709..8c1f48ae68e7 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -675,23 +675,23 @@ loop:
675 return err; 675 return err;
676} 676}
677 677
678int follow_up(struct vfsmount **mnt, struct dentry **dentry) 678int follow_up(struct path *path)
679{ 679{
680 struct vfsmount *parent; 680 struct vfsmount *parent;
681 struct dentry *mountpoint; 681 struct dentry *mountpoint;
682 spin_lock(&vfsmount_lock); 682 spin_lock(&vfsmount_lock);
683 parent=(*mnt)->mnt_parent; 683 parent = path->mnt->mnt_parent;
684 if (parent == *mnt) { 684 if (parent == path->mnt) {
685 spin_unlock(&vfsmount_lock); 685 spin_unlock(&vfsmount_lock);
686 return 0; 686 return 0;
687 } 687 }
688 mntget(parent); 688 mntget(parent);
689 mountpoint=dget((*mnt)->mnt_mountpoint); 689 mountpoint = dget(path->mnt->mnt_mountpoint);
690 spin_unlock(&vfsmount_lock); 690 spin_unlock(&vfsmount_lock);
691 dput(*dentry); 691 dput(path->dentry);
692 *dentry = mountpoint; 692 path->dentry = mountpoint;
693 mntput(*mnt); 693 mntput(path->mnt);
694 *mnt = parent; 694 path->mnt = parent;
695 return 1; 695 return 1;
696} 696}
697 697
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 9f1ea3127f5d..7b2b3f775326 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -173,7 +173,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
173 .dentry = dget(dparent)}; 173 .dentry = dget(dparent)};
174 174
175 while (path.dentry == path.mnt->mnt_root && 175 while (path.dentry == path.mnt->mnt_root &&
176 follow_up(&path.mnt, &path.dentry)) 176 follow_up(&path))
177 ; 177 ;
178 dp = dget_parent(path.dentry); 178 dp = dget_parent(path.dentry);
179 dput(path.dentry); 179 dput(path.dentry);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 325dd3ad39a0..9cd5a717be3b 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -79,7 +79,7 @@ extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
79extern struct dentry *lookup_one_noperm(const char *, struct dentry *); 79extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
80 80
81extern int follow_down(struct vfsmount **, struct dentry **); 81extern int follow_down(struct vfsmount **, struct dentry **);
82extern int follow_up(struct vfsmount **, struct dentry **); 82extern int follow_up(struct path *);
83 83
84extern struct dentry *lock_rename(struct dentry *, struct dentry *); 84extern struct dentry *lock_rename(struct dentry *, struct dentry *);
85extern void unlock_rename(struct dentry *, struct dentry *); 85extern void unlock_rename(struct dentry *, struct dentry *);