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>
This commit is contained in:
Josef Bacik 2024-06-24 11:49:46 -04:00 • committed by Christian Brauner
commit 1901c92497
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2
2 changed files with 113 additions and 2 deletions