mbox series

[0/5] NFS: Clean up NFS version module loading

Message ID 20241001203344.327044-1-anna@kernel.org (mailing list archive)
Headers show
Series NFS: Clean up NFS version module loading | expand

Message

Anna Schumaker Oct. 1, 2024, 8:33 p.m. UTC
From: Anna Schumaker <anna.schumaker@oracle.com>

I noticed that I initally coded this to use a linked list instead of
an array. This adds a lot of extra "search the list" work that we don't
need to do since we'll always know the (integer) NFS version number that
we are looking for.

While I'm here, I cleaned up the locking to use a reader-write lock
matching how the VFS does things. I also renamed get_nfs_version() to
find_nfs_version(), and implemented a new get_nfs_version() that
abstracts out taking the module reference and acts as the opposite of
put_nfs_version()

Anna


Anna Schumaker (5):
  NFS: Clean up locking the nfs_versions list
  NFS: Convert the NFS module list into an array
  NFS: Rename get_nfs_version() -> find_nfs_version()
  NFS: Clean up find_nfs_version()
  NFS: Implement get_nfs_version()

 fs/nfs/client.c     | 64 ++++++++++++++++++++++++---------------------
 fs/nfs/fs_context.c |  6 ++---
 fs/nfs/namespace.c  |  2 +-
 fs/nfs/nfs.h        |  4 +--
 4 files changed, 40 insertions(+), 36 deletions(-)

2.46.2