summaryrefslogtreecommitdiff
path: root/kernel/nscommon.c
diff options
context:
space:
mode:
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);