kernfs: switch kernfs to use an rwsem
authorIan Kent <raven@themaw.net>
Fri, 16 Jul 2021 09:28:29 +0000 (17:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jul 2021 07:29:15 +0000 (09:29 +0200)
commit7ba0273b2f34a55efe967d3c7381fb1da2ca195f
treeb8c0df46d2918cd7fc27c87fa1f9e058bbfd6aeb
parentc7e7c04274b13f98f758fb69b03f2ab61976ea80
kernfs: switch kernfs to use an rwsem

The kernfs global lock restricts the ability to perform kernfs node
lookup operations in parallel during path walks.

Change the kernfs mutex to an rwsem so that, when opportunity arises,
node searches can be done in parallel with path walk lookups.

Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Link: https://lore.kernel.org/r/162642770946.63632.2218304587223241374.stgit@web.messagingengine.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/dir.c
fs/kernfs/file.c
fs/kernfs/inode.c
fs/kernfs/kernfs-internal.h
fs/kernfs/mount.c
fs/kernfs/symlink.c
include/linux/kernfs.h