fs: keep an index of current mount namespaces
authorJosef Bacik <josef@toxicpanda.com>
Mon, 24 Jun 2024 15:49:46 +0000 (11:49 -0400)
committerChristian Brauner <brauner@kernel.org>
Fri, 28 Jun 2024 07:53:30 +0000 (09:53 +0200)
commit1901c92497bd90caf608a474f1bf4d8795b372a2
tree2a2604e8effabdbe8ccb4ed4ec09688897adefef
parentf3107df39df123328a9d3c8f40c006834b37287d
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>
fs/mount.h
fs/namespace.c