diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-09-12 13:52:40 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-19 14:26:14 +0200 |
| commit | 885fc8ac0a4dc70f5d87b80b0977292870e35c60 (patch) | |
| tree | d07cb453bcaef7099f3de74733dd86cf4fd761fe /include/linux/ns_common.h | |
| parent | 86c5aba210b145d7de011a5abaf9b785aa70a183 (diff) | |
nstree: make iterator generic
Move the namespace iteration infrastructure originally introduced for
mount namespaces into a generic library usable by all namespace types.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/ns_common.h')
| -rw-r--r-- | include/linux/ns_common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h index bc2e0758e1c9..7224072cccc5 100644 --- a/include/linux/ns_common.h +++ b/include/linux/ns_common.h @@ -3,6 +3,7 @@ #define _LINUX_NS_COMMON_H #include <linux/refcount.h> +#include <linux/rbtree.h> struct proc_ns_operations; @@ -20,6 +21,14 @@ struct ns_common { const struct proc_ns_operations *ops; unsigned int inum; refcount_t count; + union { + struct { + u64 ns_id; + struct rb_node ns_tree_node; + struct list_head ns_list_node; + }; + struct rcu_head ns_rcu; + }; }; #define to_ns_common(__ns) \ |
