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

nstree: make struct ns_tree private

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>

+14 -13
-13
include/linux/nstree.h
··· 9 9 #include <linux/rculist.h> 10 10 #include <linux/cookie.h> 11 11 12 - /** 13 - * struct ns_tree - Namespace tree 14 - * @ns_tree: Rbtree of namespaces of a particular type 15 - * @ns_list: Sequentially walkable list of all namespaces of this type 16 - * @ns_tree_lock: Seqlock to protect the tree and list 17 - */ 18 - struct ns_tree { 19 - struct rb_root ns_tree; 20 - struct list_head ns_list; 21 - seqlock_t ns_tree_lock; 22 - int type; 23 - }; 24 - 25 12 extern struct ns_tree cgroup_ns_tree; 26 13 extern struct ns_tree ipc_ns_tree; 27 14 extern struct ns_tree mnt_ns_tree;
+14
kernel/nstree.c
··· 4 4 #include <linux/proc_ns.h> 5 5 #include <linux/vfsdebug.h> 6 6 7 + /** 8 + * struct ns_tree - Namespace tree 9 + * @ns_tree: Rbtree of namespaces of a particular type 10 + * @ns_list: Sequentially walkable list of all namespaces of this type 11 + * @ns_tree_lock: Seqlock to protect the tree and list 12 + * @type: type of namespaces in this tree 13 + */ 14 + struct ns_tree { 15 + struct rb_root ns_tree; 16 + struct list_head ns_list; 17 + seqlock_t ns_tree_lock; 18 + int type; 19 + }; 20 + 7 21 struct ns_tree mnt_ns_tree = { 8 22 .ns_tree = RB_ROOT, 9 23 .ns_list = LIST_HEAD_INIT(mnt_ns_tree.ns_list),