summaryrefslogtreecommitdiff
path: root/include/linux/ns_common.h
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 /include/linux/ns_common.h
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 'include/linux/ns_common.h')
-rw-r--r--include/linux/ns_common.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h
index 6a4ca8c3b9c4..f90509ee0900 100644
--- a/include/linux/ns_common.h
+++ b/include/linux/ns_common.h
@@ -26,20 +26,19 @@ static __always_inline bool is_ns_init_id(const struct ns_common *ns)
return ns->ns_id <= NS_LAST_INIT_ID;
}
-
-#define NS_COMMON_INIT(nsname, refs) \
-{ \
- .ns_type = ns_common_type(&nsname), \
- .ns_id = ns_init_id(&nsname), \
- .inum = ns_init_inum(&nsname), \
- .ops = to_ns_operations(&nsname), \
- .stashed = NULL, \
- .__ns_ref = REFCOUNT_INIT(refs), \
- .__ns_ref_active = ATOMIC_INIT(1), \
- .ns_list_node = LIST_HEAD_INIT(nsname.ns.ns_list_node), \
- .ns_owner_entry = LIST_HEAD_INIT(nsname.ns.ns_owner_entry), \
- .ns_owner = LIST_HEAD_INIT(nsname.ns.ns_owner), \
- .ns_unified_list_node = LIST_HEAD_INIT(nsname.ns.ns_unified_list_node), \
+#define NS_COMMON_INIT(nsname, refs) \
+{ \
+ .ns_type = ns_common_type(&nsname), \
+ .ns_id = ns_init_id(&nsname), \
+ .inum = ns_init_inum(&nsname), \
+ .ops = to_ns_operations(&nsname), \
+ .stashed = NULL, \
+ .__ns_ref = REFCOUNT_INIT(refs), \
+ .__ns_ref_active = ATOMIC_INIT(1), \
+ .ns_unified_node.ns_list_entry = LIST_HEAD_INIT(nsname.ns.ns_unified_node.ns_list_entry), \
+ .ns_tree_node.ns_list_entry = LIST_HEAD_INIT(nsname.ns.ns_tree_node.ns_list_entry), \
+ .ns_owner_node.ns_list_entry = LIST_HEAD_INIT(nsname.ns.ns_owner_node.ns_list_entry), \
+ .ns_owner_root.ns_list_head = LIST_HEAD_INIT(nsname.ns.ns_owner_root.ns_list_head), \
}
#define ns_common_init(__ns) \