From: Christian Brauner Date: Fri, 12 Sep 2025 11:52:32 +0000 (+0200) Subject: ipc: use ns_common_init() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90d4d9f4d235673da83574f0f84be3e37f955a39;p=thirdparty%2Fkernel%2Fstable.git ipc: use ns_common_init() Don't cargo-cult the same thing over and over. Reviewed-by: Jan Kara Signed-off-by: Christian Brauner --- diff --git a/ipc/namespace.c b/ipc/namespace.c index 4df91ceeeafe9..d4188a88ee57b 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -61,12 +61,10 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns, if (ns == NULL) goto fail_dec; - err = ns_alloc_inum(&ns->ns); + err = ns_common_init(&ns->ns, &ipcns_operations, true); if (err) goto fail_free; - ns->ns.ops = &ipcns_operations; - refcount_set(&ns->ns.count, 1); ns->user_ns = get_user_ns(user_ns); ns->ucounts = ucounts;