Thread (71 messages) 71 messages, 7 authors, 2025-09-19
STALE262d REVIEWED: 9 (9M)
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 09/33] ipc: use ns_common_init()

From: Christian Brauner <brauner@kernel.org>
Date: 2025-09-12 11:53:52
Also in: cgroups, linux-block, linux-fsdevel, linux-kselftest, linux-nfs, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

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>
---
 ipc/namespace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 4df91ceeeafe..d4188a88ee57 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;
 
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help