]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ns: rename is_initial_namespace()
authorChristian Brauner <brauner@kernel.org>
Mon, 10 Nov 2025 15:08:21 +0000 (16:08 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 11 Nov 2025 09:01:31 +0000 (10:01 +0100)
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>
include/linux/ns_common.h
kernel/nscommon.c

index 7e4df96b7411b2445164ed06349b4caef3649c6f..b9e8f21a6984e9d5dcd6437171c492811e1babb6 100644 (file)
@@ -13,7 +13,7 @@ int __ns_common_init(struct ns_common *ns, u32 ns_type, const struct proc_ns_ope
 void __ns_common_free(struct ns_common *ns);
 struct ns_common *__must_check ns_owner(struct ns_common *ns);
 
-static __always_inline bool is_initial_namespace(const struct ns_common *ns)
+static __always_inline bool is_ns_init_inum(const struct ns_common *ns)
 {
        VFS_WARN_ON_ONCE(ns->inum == 0);
        return unlikely(in_range(ns->inum, MNT_NS_INIT_INO,
index 88f70baccb75ecf13fc58b8a28f31727c5e42e69..bdc3c86231d38e0c46e6c9b118a83256bcb332d0 100644 (file)
@@ -82,7 +82,7 @@ int __ns_common_init(struct ns_common *ns, u32 ns_type, const struct proc_ns_ope
         * active use (installed in nsproxy) and decremented when all
         * active uses are gone. Initial namespaces are always active.
         */
-       if (is_initial_namespace(ns))
+       if (is_ns_init_inum(ns))
                atomic_set(&ns->__ns_ref_active, 1);
        else
                atomic_set(&ns->__ns_ref_active, 0);