]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
switch follow_up() to struct path
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Apr 2009 07:26:48 +0000 (03:26 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Jun 2009 01:36:00 +0000 (21:36 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/autofs4/dev-ioctl.c
fs/namei.c
fs/nfsd/vfs.c
include/linux/namei.h

index f71dac9986f0b63abc586bdc11409d5aa3aad5bc..670407576b255954628ba85a55459e2e7c9bedd8 100644 (file)
@@ -212,7 +212,7 @@ static int find_autofs_mount(const char *pathname,
                                err = 0;
                        }
                }
-               if (!follow_up(&path.mnt, &path.dentry))
+               if (!follow_up(&path))
                        break;
        }
        path_put(&path);
index 4379ef9897092303467c9a8763d76ebafd27e56f..8c1f48ae68e7c6e1193b8e371e88ac4599b0a493 100644 (file)
@@ -675,23 +675,23 @@ loop:
        return err;
 }
 
-int follow_up(struct vfsmount **mnt, struct dentry **dentry)
+int follow_up(struct path *path)
 {
        struct vfsmount *parent;
        struct dentry *mountpoint;
        spin_lock(&vfsmount_lock);
-       parent=(*mnt)->mnt_parent;
-       if (parent == *mnt) {
+       parent = path->mnt->mnt_parent;
+       if (parent == path->mnt) {
                spin_unlock(&vfsmount_lock);
                return 0;
        }
        mntget(parent);
-       mountpoint=dget((*mnt)->mnt_mountpoint);
+       mountpoint = dget(path->mnt->mnt_mountpoint);
        spin_unlock(&vfsmount_lock);
-       dput(*dentry);
-       *dentry = mountpoint;
-       mntput(*mnt);
-       *mnt = parent;
+       dput(path->dentry);
+       path->dentry = mountpoint;
+       mntput(path->mnt);
+       path->mnt = parent;
        return 1;
 }
 
index 9f1ea3127f5d4ed8048c34becd7cc5591dac8dde..7b2b3f775326c837200a4e430c1b5357399cfc63 100644 (file)
@@ -173,7 +173,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
                                            .dentry = dget(dparent)};
 
                        while (path.dentry == path.mnt->mnt_root &&
-                              follow_up(&path.mnt, &path.dentry))
+                              follow_up(&path))
                                ;
                        dp = dget_parent(path.dentry);
                        dput(path.dentry);
index 325dd3ad39a02497657b2d0693e309a0b12bbc8b..9cd5a717be3b2a1265003443f9cc2b3d0aa5a8bc 100644 (file)
@@ -79,7 +79,7 @@ extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
 extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
 
 extern int follow_down(struct vfsmount **, struct dentry **);
-extern int follow_up(struct vfsmount **, struct dentry **);
+extern int follow_up(struct path *);
 
 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
 extern void unlock_rename(struct dentry *, struct dentry *);