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.

pid: 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>

+1 -3
+1 -3
kernel/pid_namespace.c
··· 102 102 if (ns->pid_cachep == NULL) 103 103 goto out_free_idr; 104 104 105 - err = ns_alloc_inum(&ns->ns); 105 + err = ns_common_init(&ns->ns, &pidns_operations, true); 106 106 if (err) 107 107 goto out_free_idr; 108 - ns->ns.ops = &pidns_operations; 109 108 110 109 ns->pid_max = PID_MAX_LIMIT; 111 110 err = register_pidns_sysctls(ns); 112 111 if (err) 113 112 goto out_free_inum; 114 113 115 - refcount_set(&ns->ns.count, 1); 116 114 ns->level = level; 117 115 ns->parent = get_pid_ns(parent_pid_ns); 118 116 ns->user_ns = get_user_ns(user_ns);