Thread (8 messages) 8 messages, 3 authors, 2025-09-24
STALE298d

[PATCH 1/3] nstree: make struct ns_tree private

From: Christian Brauner <brauner@kernel.org>
Date: 2025-09-24 11:34:15
Also in: cgroups, linux-fsdevel
Subsystem: the rest · Maintainer: Linus Torvalds

Don't expose it directly. There's no need to do that.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 include/linux/nstree.h | 13 -------------
 kernel/nstree.c        | 13 +++++++++++++
 2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/linux/nstree.h b/include/linux/nstree.h
index 29ad6402260c..8b8636690473 100644
--- a/include/linux/nstree.h
+++ b/include/linux/nstree.h
@@ -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;
diff --git a/kernel/nstree.c b/kernel/nstree.c
index bbe8bedc924c..113d681857f1 100644
--- a/kernel/nstree.c
+++ b/kernel/nstree.c
@@ -4,6 +4,19 @@
 #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
+ */
+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),
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help