diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-23 17:29:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-24 08:15:24 -0400 |
commit | 3b22edc5730b87d360ee7dd7143397ba09b73a47 (patch) | |
tree | 0ee6b90aa3be7878ee73363f167c0a9b47b89f5e /fs | |
parent | 654f562c526cf9dfb8d453f687341fe0777ee454 (diff) | |
download | linux-3.10-3b22edc5730b87d360ee7dd7143397ba09b73a47.tar.gz linux-3.10-3b22edc5730b87d360ee7dd7143397ba09b73a47.tar.bz2 linux-3.10-3b22edc5730b87d360ee7dd7143397ba09b73a47.zip |
VFS: Switch init_mount_tree() to use the new create_mnt_ns() helper
Eliminates some duplicated code...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index a7bea8c8bd4..4a86b859516 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2222,16 +2222,9 @@ static void __init init_mount_tree(void) mnt = do_kern_mount("rootfs", 0, "rootfs", NULL); if (IS_ERR(mnt)) panic("Can't create rootfs"); - ns = kmalloc(sizeof(*ns), GFP_KERNEL); - if (!ns) + ns = create_mnt_ns(mnt); + if (IS_ERR(ns)) panic("Can't allocate initial namespace"); - atomic_set(&ns->count, 1); - INIT_LIST_HEAD(&ns->list); - init_waitqueue_head(&ns->poll); - ns->event = 0; - list_add(&mnt->mnt_list, &ns->list); - ns->root = mnt; - mnt->mnt_ns = ns; init_task.nsproxy->mnt_ns = ns; get_mnt_ns(ns); |