Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ns: add NS_COMMON_INIT()

Add an initializer that can be used for the ns common initialization for
static namespace such as most init namespaces.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/87ecqhy2y5.ffs@tglx
Signed-off-by: Christian Brauner <brauner@kernel.org>

+10
+10
include/linux/ns_common.h
··· 119 119 struct user_namespace *: CLONE_NEWUSER, \ 120 120 struct uts_namespace *: CLONE_NEWUTS) 121 121 122 + #define NS_COMMON_INIT(nsname, refs) \ 123 + { \ 124 + .ns_type = ns_common_type(&nsname), \ 125 + .ns_id = 0, \ 126 + .inum = ns_init_inum(&nsname), \ 127 + .ops = to_ns_operations(&nsname), \ 128 + .stashed = NULL, \ 129 + .__ns_ref = REFCOUNT_INIT(refs), \ 130 + } 131 + 122 132 #define ns_common_init(__ns) \ 123 133 __ns_common_init(to_ns_common(__ns), \ 124 134 ns_common_type(__ns), \