mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
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>
This commit is contained in:
parent
11eb537fd8
commit
df50b5ee05
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user