Skip to content

NFS: Clean up NFS version module loading

Anna Schumaker linux-nfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5NFS: Clean up locking the nfs_versions listfs/nfs/client.c+8 -110 replies
2/5NFS: Convert the NFS module list into an arrayfs/nfs/client.c fs/nfs/nfs.h+14 -130 replies
3/5NFS: Rename get_nfs_version() -> find_nfs_version()fs/nfs/client.c fs/nfs/fs_context.c fs/nfs/nfs.h+6 -60 replies
4/5NFS: Clean up find_nfs_version()fs/nfs/client.c+6 -70 replies
5/5NFS: Implement get_nfs_version()fs/nfs/client.c fs/nfs/fs_context.c fs/nfs/namespace.c +1 more+12 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

From: Anna Schumaker <[email protected]>

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