diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-06-24 18:49:46 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-06-28 10:53:30 +0300 |
commit | 1901c92497bd90caf608a474f1bf4d8795b372a2 (patch) | |
tree | 2a2604e8effabdbe8ccb4ed4ec09688897adefef /fs/mount.h | |
parent | f3107df39df123328a9d3c8f40c006834b37287d (diff) | |
download | linux-1901c92497bd90caf608a474f1bf4d8795b372a2.tar.xz |
fs: keep an index of current mount namespaces
In order to allow for listmount() to be used on different namespaces we
need a way to lookup a mount ns by its id. Keep a rbtree of the current
!anonymous mount name spaces indexed by ID that we can use to look up
the namespace.
Co-developed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/e5fdd78a90f5b00a75bd893962a70f52a2c015cd.1719243756.git.josef@toxicpanda.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/mount.h')
-rw-r--r-- | fs/mount.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/mount.h b/fs/mount.h index 4a42fc68f4cc..5b980c262c0c 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -16,6 +16,8 @@ struct mnt_namespace { u64 event; unsigned int nr_mounts; /* # of mounts in the namespace */ unsigned int pending_mounts; + struct rb_node mnt_ns_tree_node; /* node in the mnt_ns_tree */ + refcount_t passive; /* number references not pinning @mounts */ } __randomize_layout; struct mnt_pcp { |