Skip to content

Commit 10cdfcd

Browse files
committed
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>
1 parent d969328 commit 10cdfcd

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

include/linux/nstree.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@
99
#include <linux/rculist.h>
1010
#include <linux/cookie.h>
1111

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-
2512
extern struct ns_tree cgroup_ns_tree;
2613
extern struct ns_tree ipc_ns_tree;
2714
extern struct ns_tree mnt_ns_tree;

kernel/nstree.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
#include <linux/proc_ns.h>
55
#include <linux/vfsdebug.h>
66

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+
721
struct ns_tree mnt_ns_tree = {
822
.ns_tree = RB_ROOT,
923
.ns_list = LIST_HEAD_INIT(mnt_ns_tree.ns_list),

0 commit comments

Comments
 (0)