mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
nfs41: Use mount minorversion option
Use the mount minorversion option to initialize the nfs_client cl_minorversion and match it in nfs_match_client() when looking up a nfs_client. [nfs41: remove ifdefs around nfs_client_initdata.minorversion] Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
94a417f3d7
commit
5aae4a9ae0
@ -102,6 +102,7 @@ struct nfs_client_initdata {
|
||||
size_t addrlen;
|
||||
const struct nfs_rpc_ops *rpc_ops;
|
||||
int proto;
|
||||
u32 minorversion;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -150,6 +151,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
|
||||
rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS client");
|
||||
clp->cl_boot_time = CURRENT_TIME;
|
||||
clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED;
|
||||
clp->cl_minorversion = cl_init->minorversion;
|
||||
#endif
|
||||
cred = rpc_lookup_machine_cred();
|
||||
if (!IS_ERR(cred))
|
||||
@ -420,7 +422,9 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat
|
||||
|
||||
if (clp->cl_proto != data->proto)
|
||||
continue;
|
||||
|
||||
/* Match nfsv4 minorversion */
|
||||
if (clp->cl_minorversion != data->minorversion)
|
||||
continue;
|
||||
/* Match the full socket address */
|
||||
if (!nfs_sockaddr_cmp(sap, clap))
|
||||
continue;
|
||||
@ -1110,6 +1114,7 @@ static int nfs4_set_client(struct nfs_server *server,
|
||||
.addrlen = addrlen,
|
||||
.rpc_ops = &nfs_v4_clientops,
|
||||
.proto = proto,
|
||||
.minorversion = minorversion,
|
||||
};
|
||||
struct nfs_client *clp;
|
||||
int error;
|
||||
|
Loading…
Reference in New Issue
Block a user