summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAnna Schumaker <anna.schumaker@oracle.com>2024-10-01 22:33:42 +0200
committerTrond Myklebust <trond.myklebust@hammerspace.com>2024-11-08 20:17:37 +0100
commitdf50b5ee0564412e4570abae7767d9baa5911f23 (patch)
treef890e57683e50dfc2966756d86c9d8542f099e9d /fs/nfs
parentNFS: Convert the NFS module list into an array (diff)
downloadlinux-df50b5ee0564412e4570abae7767d9baa5911f23.tar.xz
linux-df50b5ee0564412e4570abae7767d9baa5911f23.zip
NFS: Rename get_nfs_version() -> find_nfs_version()
We have a put_nfs_version() that handles refcounting on the nfs version module, but get_nfs_version() does much more work to find a version module based on version number. Let's change 'get' to 'find' to better match what it's doing. Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c8
-rw-r--r--fs/nfs/fs_context.c2
-rw-r--r--fs/nfs/nfs.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 5b547d0afa18..27f862490f82 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -80,7 +80,7 @@ const struct rpc_program nfs_program = {
.pipe_dir_name = NFS_PIPE_DIRNAME,
};
-static struct nfs_subversion *find_nfs_version(unsigned int version)
+static struct nfs_subversion *__find_nfs_version(unsigned int version)
{
struct nfs_subversion *nfs;
@@ -93,13 +93,13 @@ static struct nfs_subversion *find_nfs_version(unsigned int version)
return nfs;
}
-struct nfs_subversion *get_nfs_version(unsigned int version)
+struct nfs_subversion *find_nfs_version(unsigned int version)
{
- struct nfs_subversion *nfs = find_nfs_version(version);
+ struct nfs_subversion *nfs = __find_nfs_version(version);
if (IS_ERR(nfs)) {
request_module("nfsv%d", version);
- nfs = find_nfs_version(version);
+ nfs = __find_nfs_version(version);
}
if (!IS_ERR(nfs) && !try_module_get(nfs->owner))
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index 7e000d782e28..d553daa4c09c 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -1467,7 +1467,7 @@ static int nfs_fs_context_validate(struct fs_context *fc)
/* Load the NFS protocol module if we haven't done so yet */
if (!ctx->nfs_mod) {
- nfs_mod = get_nfs_version(ctx->version);
+ nfs_mod = find_nfs_version(ctx->version);
if (IS_ERR(nfs_mod)) {
ret = PTR_ERR(nfs_mod);
goto out_version_unavailable;
diff --git a/fs/nfs/nfs.h b/fs/nfs/nfs.h
index 0329fc3023d0..a30bf8ef79d7 100644
--- a/fs/nfs/nfs.h
+++ b/fs/nfs/nfs.h
@@ -21,7 +21,7 @@ struct nfs_subversion {
const struct xattr_handler * const *xattr; /* NFS xattr handlers */
};
-struct nfs_subversion *get_nfs_version(unsigned int);
+struct nfs_subversion *find_nfs_version(unsigned int);
void put_nfs_version(struct nfs_subversion *);
void register_nfs_version(struct nfs_subversion *);
void unregister_nfs_version(struct nfs_subversion *);