diff options
| -rw-r--r-- | fs/proc/root.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index 9a8a2b77b874..03102d978180 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
| @@ -91,20 +91,18 @@ static struct file_system_type proc_fs_type = { | |||
| 91 | 91 | ||
| 92 | void __init proc_root_init(void) | 92 | void __init proc_root_init(void) |
| 93 | { | 93 | { |
| 94 | struct vfsmount *mnt; | ||
| 95 | int err; | 94 | int err; |
| 96 | 95 | ||
| 97 | proc_init_inodecache(); | 96 | proc_init_inodecache(); |
| 98 | err = register_filesystem(&proc_fs_type); | 97 | err = register_filesystem(&proc_fs_type); |
| 99 | if (err) | 98 | if (err) |
| 100 | return; | 99 | return; |
| 101 | mnt = kern_mount_data(&proc_fs_type, &init_pid_ns); | 100 | err = pid_ns_prepare_proc(&init_pid_ns); |
| 102 | if (IS_ERR(mnt)) { | 101 | if (err) { |
| 103 | unregister_filesystem(&proc_fs_type); | 102 | unregister_filesystem(&proc_fs_type); |
| 104 | return; | 103 | return; |
| 105 | } | 104 | } |
| 106 | 105 | ||
| 107 | init_pid_ns.proc_mnt = mnt; | ||
| 108 | proc_symlink("mounts", NULL, "self/mounts"); | 106 | proc_symlink("mounts", NULL, "self/mounts"); |
| 109 | 107 | ||
| 110 | proc_net_init(); | 108 | proc_net_init(); |
| @@ -209,5 +207,5 @@ int pid_ns_prepare_proc(struct pid_namespace *ns) | |||
| 209 | 207 | ||
| 210 | void pid_ns_release_proc(struct pid_namespace *ns) | 208 | void pid_ns_release_proc(struct pid_namespace *ns) |
| 211 | { | 209 | { |
| 212 | mntput(ns->proc_mnt); | 210 | kern_unmount(ns->proc_mnt); |
| 213 | } | 211 | } |
