]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFS: Clean up locking the nfs_versions list
authorAnna Schumaker <anna.schumaker@oracle.com>
Tue, 1 Oct 2024 20:33:40 +0000 (16:33 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 8 Nov 2024 19:17:37 +0000 (14:17 -0500)
commit6278c86a6cc14fdc66988958bbefec3407fa56a0
tree7fb91902f975cd9b9895075ae4acb0b73ae10636
parentff7afaeca1a15fbeaa2c4795ee806c0667bd77b2
NFS: Clean up locking the nfs_versions list

This patch replaces the nfs_version_mutex and nfs_version_lock with a
single RW lock that protects access to the nfs_versions list.

The mutex around request_module() seemed unnecessary to me, and I
couldn't find any other callers using a lock around calls to
request_module() when I looked.

At the same time, I saw fs/filesystems.c using a RW lock to protect
their filesystems list. This seems like a better idea than a spinlock to
me, so I'm also making that change while I'm here.

Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/client.c