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: rename is_initial_namespace()

Rename is_initial_namespace() to ns_init_inum() and make it symmetrical
with the ns id variant.

Link: https://patch.msgid.link/20251110-work-namespace-nstree-fixes-v1-9-e8a9264e0fb9@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>

+2 -2
+1 -1
include/linux/ns_common.h
··· 13 13 void __ns_common_free(struct ns_common *ns); 14 14 struct ns_common *__must_check ns_owner(struct ns_common *ns); 15 15 16 - static __always_inline bool is_initial_namespace(const struct ns_common *ns) 16 + static __always_inline bool is_ns_init_inum(const struct ns_common *ns) 17 17 { 18 18 VFS_WARN_ON_ONCE(ns->inum == 0); 19 19 return unlikely(in_range(ns->inum, MNT_NS_INIT_INO,
+1 -1
kernel/nscommon.c
··· 82 82 * active use (installed in nsproxy) and decremented when all 83 83 * active uses are gone. Initial namespaces are always active. 84 84 */ 85 - if (is_initial_namespace(ns)) 85 + if (is_ns_init_inum(ns)) 86 86 atomic_set(&ns->__ns_ref_active, 1); 87 87 else 88 88 atomic_set(&ns->__ns_ref_active, 0);