]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs: lockless mntns lookup for nsfs
authorChristian Brauner <brauner@kernel.org>
Thu, 12 Dec 2024 23:03:44 +0000 (00:03 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 9 Jan 2025 15:58:52 +0000 (16:58 +0100)
commit4368898b271ad4ea3b6ae64f5cd16486a6d65430
tree341031d0e6be4cba439efc4dd9928095943bc4f2
parent67d676bb135cd4de9647616e73cfd059ef57c9a6
fs: lockless mntns lookup for nsfs

We already made the rbtree lookup lockless for the simple lookup case.
However, walking the list of mount namespaces via nsfs still happens
with taking the read lock blocking concurrent additions of new mount
namespaces pointlessly. Plus, such additions are rare anyway so allow
lockless lookup of the previous and next mount namespace by keeping a
separate list. This also allows to make some things simpler in the code.

Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-5-6e3cdaf9b280@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/mount.h
fs/namespace.c
fs/nsfs.c