switch lookup_mnt()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Apr 2009 18:06:57 +0000 (14:06 -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
fs/namespace.c
include/linux/dcache.h

index c006bc61d1ea5f14d4878b90fa94afd9be5c5a6a..527119afb6a5cca3bea37efde7e6206e04052795 100644 (file)
@@ -702,7 +702,7 @@ static int __follow_mount(struct path *path)
 {
        int res = 0;
        while (d_mountpoint(path->dentry)) {
-               struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
+               struct vfsmount *mounted = lookup_mnt(path);
                if (!mounted)
                        break;
                dput(path->dentry);
@@ -718,7 +718,7 @@ static int __follow_mount(struct path *path)
 static void follow_mount(struct path *path)
 {
        while (d_mountpoint(path->dentry)) {
-               struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
+               struct vfsmount *mounted = lookup_mnt(path);
                if (!mounted)
                        break;
                dput(path->dentry);
@@ -735,7 +735,7 @@ int follow_down(struct path *path)
 {
        struct vfsmount *mounted;
 
-       mounted = lookup_mnt(path->mnt, path->dentry);
+       mounted = lookup_mnt(path);
        if (mounted) {
                dput(path->dentry);
                mntput(path->mnt);
index ba5237be1cf982e1953ffe829d79742a3e73c30e..b94ad3d685ff4ff617675a7b02cdcf2cec084431 100644 (file)
@@ -442,11 +442,11 @@ struct vfsmount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry,
  * lookup_mnt increments the ref count before returning
  * the vfsmount struct.
  */
-struct vfsmount *lookup_mnt(struct vfsmount *mnt, struct dentry *dentry)
+struct vfsmount *lookup_mnt(struct path *path)
 {
        struct vfsmount *child_mnt;
        spin_lock(&vfsmount_lock);
-       if ((child_mnt = __lookup_mnt(mnt, dentry, 1)))
+       if ((child_mnt = __lookup_mnt(path->mnt, path->dentry, 1)))
                mntget(child_mnt);
        spin_unlock(&vfsmount_lock);
        return child_mnt;
index 97978004338db848fa60cfaec3135465a93efcf0..72ce2ae88591e9ad1fc6681ac8d205dab9dff1b5 100644 (file)
@@ -370,7 +370,7 @@ static inline int d_mountpoint(struct dentry *dentry)
        return dentry->d_mounted;
 }
 
-extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
+extern struct vfsmount *lookup_mnt(struct path *);
 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
 
 extern int sysctl_vfs_cache_pressure;