Commit bab77ebf51e3902f608ecf08c9d34a0a52ac35a9

Authored by Al Viro
1 parent e64c390ca0

switch follow_up() to struct path

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 4 changed files with 11 additions and 11 deletions Side-by-side Diff

fs/autofs4/dev-ioctl.c
... ... @@ -212,7 +212,7 @@
212 212 err = 0;
213 213 }
214 214 }
215   - if (!follow_up(&path.mnt, &path.dentry))
  215 + if (!follow_up(&path))
216 216 break;
217 217 }
218 218 path_put(&path);
... ... @@ -675,23 +675,23 @@
675 675 return err;
676 676 }
677 677  
678   -int follow_up(struct vfsmount **mnt, struct dentry **dentry)
  678 +int follow_up(struct path *path)
679 679 {
680 680 struct vfsmount *parent;
681 681 struct dentry *mountpoint;
682 682 spin_lock(&vfsmount_lock);
683   - parent=(*mnt)->mnt_parent;
684   - if (parent == *mnt) {
  683 + parent = path->mnt->mnt_parent;
  684 + if (parent == path->mnt) {
685 685 spin_unlock(&vfsmount_lock);
686 686 return 0;
687 687 }
688 688 mntget(parent);
689   - mountpoint=dget((*mnt)->mnt_mountpoint);
  689 + mountpoint = dget(path->mnt->mnt_mountpoint);
690 690 spin_unlock(&vfsmount_lock);
691   - dput(*dentry);
692   - *dentry = mountpoint;
693   - mntput(*mnt);
694   - *mnt = parent;
  691 + dput(path->dentry);
  692 + path->dentry = mountpoint;
  693 + mntput(path->mnt);
  694 + path->mnt = parent;
695 695 return 1;
696 696 }
697 697  
... ... @@ -173,7 +173,7 @@
173 173 .dentry = dget(dparent)};
174 174  
175 175 while (path.dentry == path.mnt->mnt_root &&
176   - follow_up(&path.mnt, &path.dentry))
  176 + follow_up(&path))
177 177 ;
178 178 dp = dget_parent(path.dentry);
179 179 dput(path.dentry);
include/linux/namei.h
... ... @@ -79,7 +79,7 @@
79 79 extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
80 80  
81 81 extern int follow_down(struct vfsmount **, struct dentry **);
82   -extern int follow_up(struct vfsmount **, struct dentry **);
  82 +extern int follow_up(struct path *);
83 83  
84 84 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
85 85 extern void unlock_rename(struct dentry *, struct dentry *);