summaryrefslogtreecommitdiff
path: root/kernel/nscommon.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-11-10 16:08:17 +0100
committerChristian Brauner <brauner@kernel.org>2025-11-11 10:01:30 +0100
commita657bc8a75cf40c3d0814fe6488ba4af56528f42 (patch)
tree0b61d6df0081d379da867ac5c07db4285b24878e /kernel/nscommon.c
parentd12ea8062fd31f02beeeb76a7884ab9bc4f5b197 (diff)
nstree: switch to new structures
Switch the nstree management to the new combined structures. Link: https://patch.msgid.link/20251110-work-namespace-nstree-fixes-v1-5-e8a9264e0fb9@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'kernel/nscommon.c')
-rw-r--r--kernel/nscommon.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/nscommon.c b/kernel/nscommon.c
index c910b979e433..88f70baccb75 100644
--- a/kernel/nscommon.c
+++ b/kernel/nscommon.c
@@ -2,6 +2,7 @@
/* Copyright (c) 2025 Christian Brauner <brauner@kernel.org> */
#include <linux/ns_common.h>
+#include <linux/nstree.h>
#include <linux/proc_ns.h>
#include <linux/user_namespace.h>
#include <linux/vfsdebug.h>
@@ -61,14 +62,10 @@ int __ns_common_init(struct ns_common *ns, u32 ns_type, const struct proc_ns_ope
ns->ops = ops;
ns->ns_id = 0;
ns->ns_type = ns_type;
- RB_CLEAR_NODE(&ns->ns_tree_node);
- RB_CLEAR_NODE(&ns->ns_unified_tree_node);
- RB_CLEAR_NODE(&ns->ns_owner_tree_node);
- INIT_LIST_HEAD(&ns->ns_list_node);
- INIT_LIST_HEAD(&ns->ns_unified_list_node);
- ns->ns_owner_tree = RB_ROOT;
- INIT_LIST_HEAD(&ns->ns_owner);
- INIT_LIST_HEAD(&ns->ns_owner_entry);
+ ns_tree_node_init(&ns->ns_tree_node);
+ ns_tree_node_init(&ns->ns_unified_node);
+ ns_tree_node_init(&ns->ns_owner_node);
+ ns_tree_root_init(&ns->ns_owner_root);
#ifdef CONFIG_DEBUG_VFS
ns_debug(ns, ops);