diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-14 18:22:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-14 18:22:55 -0800 |
commit | ddb360778a86bcf55d856bc15df3ebd2e77afff1 (patch) | |
tree | 3d3334f4f5e56ed4ab4c779ef1b21138299944b5 /fs/proc | |
parent | 373da0a2a33018d560afcb2c77f8842985d79594 (diff) | |
parent | 759c361eb95964d0d786f8962224dd0d9e780e6e (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fs/ncpfs: fix error paths and goto statements in ncp_fill_super()
configfs: register_filesystem() called too early
fuse: register_filesystem() called too early
ubifs: too early register_filesystem()
... and the same kind of leak for mqueue
procfs: fix a vfsmount longterm reference leak
Diffstat (limited to 'fs/proc')
-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 9a8a2b77b87..03102d97818 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -91,20 +91,18 @@ static struct file_system_type proc_fs_type = { void __init proc_root_init(void) { - struct vfsmount *mnt; int err; proc_init_inodecache(); err = register_filesystem(&proc_fs_type); if (err) return; - mnt = kern_mount_data(&proc_fs_type, &init_pid_ns); - if (IS_ERR(mnt)) { + err = pid_ns_prepare_proc(&init_pid_ns); + if (err) { unregister_filesystem(&proc_fs_type); return; } - init_pid_ns.proc_mnt = mnt; proc_symlink("mounts", NULL, "self/mounts"); proc_net_init(); @@ -209,5 +207,5 @@ int pid_ns_prepare_proc(struct pid_namespace *ns) void pid_ns_release_proc(struct pid_namespace *ns) { - mntput(ns->proc_mnt); + kern_unmount(ns->proc_mnt); } |