]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nstree: make struct ns_tree private
authorChristian Brauner <brauner@kernel.org>
Wed, 24 Sep 2025 11:33:58 +0000 (13:33 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 25 Sep 2025 07:23:47 +0000 (09:23 +0200)
Don't expose it directly. There's no need to do that.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/nstree.h
kernel/nstree.c

index 29ad6402260cc2fb5d40c3c8d4e6d16340ca71f9..8b863669047390c2067f22f6a03bfa244af563cd 100644 (file)
@@ -9,19 +9,6 @@
 #include <linux/rculist.h>
 #include <linux/cookie.h>
 
-/**
- * struct ns_tree - Namespace tree
- * @ns_tree: Rbtree of namespaces of a particular type
- * @ns_list: Sequentially walkable list of all namespaces of this type
- * @ns_tree_lock: Seqlock to protect the tree and list
- */
-struct ns_tree {
-       struct rb_root ns_tree;
-       struct list_head ns_list;
-       seqlock_t ns_tree_lock;
-       int type;
-};
-
 extern struct ns_tree cgroup_ns_tree;
 extern struct ns_tree ipc_ns_tree;
 extern struct ns_tree mnt_ns_tree;
index bbe8bedc924ca920094e577ebeb1b9001088fcf7..ecc88b013eff2f4c1eecb7b7c506e2bc7fa346a9 100644 (file)
@@ -4,6 +4,20 @@
 #include <linux/proc_ns.h>
 #include <linux/vfsdebug.h>
 
+/**
+ * struct ns_tree - Namespace tree
+ * @ns_tree: Rbtree of namespaces of a particular type
+ * @ns_list: Sequentially walkable list of all namespaces of this type
+ * @ns_tree_lock: Seqlock to protect the tree and list
+ * @type: type of namespaces in this tree
+ */
+struct ns_tree {
+       struct rb_root ns_tree;
+       struct list_head ns_list;
+       seqlock_t ns_tree_lock;
+       int type;
+};
+
 struct ns_tree mnt_ns_tree = {
        .ns_tree = RB_ROOT,
        .ns_list = LIST_HEAD_INIT(mnt_ns_tree.ns_list),