Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

user: use ns_common_init()

Don't cargo-cult the same thing over and over.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>

+2 -3
+2 -3
kernel/user_namespace.c
··· 124 124 goto fail_dec; 125 125 126 126 ns->parent_could_setfcap = cap_raised(new->cap_effective, CAP_SETFCAP); 127 - ret = ns_alloc_inum(&ns->ns); 127 + 128 + ret = ns_common_init(&ns->ns, &userns_operations, true); 128 129 if (ret) 129 130 goto fail_free; 130 - ns->ns.ops = &userns_operations; 131 131 132 - refcount_set(&ns->ns.count, 1); 133 132 /* Leave the new->user_ns reference with the new user namespace. */ 134 133 ns->parent = parent_ns; 135 134 ns->level = parent_ns->level + 1;