setting ->proc_mnt doesn't belong in proc_get_sb()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 26 Jul 2010 09:09:36 +0000 (13:09 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 29 Oct 2010 08:16:58 +0000 (04:16 -0400)
take that to kern_mount_data()-using callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/proc/root.c

index 93d99b316325164758ed1d48a740f65ef9a59e9b..03b4f6fe4984c1671c4b16e975f1cdc1fbbc8bf3 100644 (file)
@@ -79,7 +79,6 @@ static int proc_get_sb(struct file_system_type *fs_type,
                }
 
                sb->s_flags |= MS_ACTIVE;
-               ns->proc_mnt = mnt;
        }
 
        simple_set_mnt(mnt, sb);
@@ -115,6 +114,7 @@ void __init proc_root_init(void)
                return;
        }
 
+       init_pid_ns.proc_mnt = proc_mnt;
        proc_symlink("mounts", NULL, "self/mounts");
 
        proc_net_init();
@@ -213,6 +213,7 @@ int pid_ns_prepare_proc(struct pid_namespace *ns)
        if (IS_ERR(mnt))
                return PTR_ERR(mnt);
 
+       ns->proc_mnt = mnt;
        return 0;
 }