Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anna Schumaker and committed by
Trond Myklebust
df50b5ee 11eb537f

+6 -6
+4 -4
fs/nfs/client.c
··· 80 80 .pipe_dir_name = NFS_PIPE_DIRNAME, 81 81 }; 82 82 83 - static struct nfs_subversion *find_nfs_version(unsigned int version) 83 + static struct nfs_subversion *__find_nfs_version(unsigned int version) 84 84 { 85 85 struct nfs_subversion *nfs; 86 86 ··· 93 93 return nfs; 94 94 } 95 95 96 - struct nfs_subversion *get_nfs_version(unsigned int version) 96 + struct nfs_subversion *find_nfs_version(unsigned int version) 97 97 { 98 - struct nfs_subversion *nfs = find_nfs_version(version); 98 + struct nfs_subversion *nfs = __find_nfs_version(version); 99 99 100 100 if (IS_ERR(nfs)) { 101 101 request_module("nfsv%d", version); 102 - nfs = find_nfs_version(version); 102 + nfs = __find_nfs_version(version); 103 103 } 104 104 105 105 if (!IS_ERR(nfs) && !try_module_get(nfs->owner))
+1 -1
fs/nfs/fs_context.c
··· 1467 1467 1468 1468 /* Load the NFS protocol module if we haven't done so yet */ 1469 1469 if (!ctx->nfs_mod) { 1470 - nfs_mod = get_nfs_version(ctx->version); 1470 + nfs_mod = find_nfs_version(ctx->version); 1471 1471 if (IS_ERR(nfs_mod)) { 1472 1472 ret = PTR_ERR(nfs_mod); 1473 1473 goto out_version_unavailable;
+1 -1
fs/nfs/nfs.h
··· 21 21 const struct xattr_handler * const *xattr; /* NFS xattr handlers */ 22 22 }; 23 23 24 - struct nfs_subversion *get_nfs_version(unsigned int); 24 + struct nfs_subversion *find_nfs_version(unsigned int); 25 25 void put_nfs_version(struct nfs_subversion *); 26 26 void register_nfs_version(struct nfs_subversion *); 27 27 void unregister_nfs_version(struct nfs_subversion *);