vfs: spread struct mount - tree_contains_unbindable
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Nov 2011 01:01:19 +0000 (20:01 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Jan 2012 03:57:00 +0000 (22:57 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c

index 64ae40c91079300b26e5a95e2ab862f6c46469f0..91bd15d9b2cd0488f6a2d155402888cd9ea4ca67 100644 (file)
@@ -1845,10 +1845,10 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
        return err;
 }
 
-static inline int tree_contains_unbindable(struct vfsmount *mnt)
+static inline int tree_contains_unbindable(struct mount *mnt)
 {
        struct mount *p;
-       for (p = real_mount(mnt); p; p = next_mnt(p, mnt)) {
+       for (p = mnt; p; p = next_mnt(p, &mnt->mnt)) {
                if (IS_MNT_UNBINDABLE(&p->mnt))
                        return 1;
        }
@@ -1902,7 +1902,7 @@ static int do_move_mount(struct path *path, char *old_name)
         * mount which is shared.
         */
        if (IS_MNT_SHARED(path->mnt) &&
-           tree_contains_unbindable(old_path.mnt))
+           tree_contains_unbindable(old))
                goto out1;
        err = -ELOOP;
        for (p = path->mnt; mnt_has_parent(p); p = p->mnt_parent)