switch follow_mount()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Apr 2009 17:59:41 +0000 (13:59 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Jun 2009 01:36:01 +0000 (21:36 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c

index 4d49a3eee6d43f4f21756cd5e181c15469584b23..c006bc61d1ea5f14d4878b90fa94afd9be5c5a6a 100644 (file)
@@ -715,16 +715,16 @@ static int __follow_mount(struct path *path)
        return res;
 }
 
-static void follow_mount(struct vfsmount **mnt, struct dentry **dentry)
+static void follow_mount(struct path *path)
 {
-       while (d_mountpoint(*dentry)) {
-               struct vfsmount *mounted = lookup_mnt(*mnt, *dentry);
+       while (d_mountpoint(path->dentry)) {
+               struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
                if (!mounted)
                        break;
-               dput(*dentry);
-               mntput(*mnt);
-               *mnt = mounted;
-               *dentry = dget(mounted->mnt_root);
+               dput(path->dentry);
+               mntput(path->mnt);
+               path->mnt = mounted;
+               path->dentry = dget(mounted->mnt_root);
        }
 }
 
@@ -779,7 +779,7 @@ static __always_inline void follow_dotdot(struct nameidata *nd)
                mntput(nd->path.mnt);
                nd->path.mnt = parent;
        }
-       follow_mount(&nd->path.mnt, &nd->path.dentry);
+       follow_mount(&nd->path);
 }
 
 /*