aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-01-15 16:04:20 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:06:07 -0500
commit883bb163f84e0a54b29846c61621f52db3f27393 (patch)
treeea11b2d1ba85cbb4422ae7ff615d6d186d709af1 /fs/nfs/client.c
parent1093a60ef34bb12010fe7ea4b780bee1c57cfbbe (diff)
NLM: Introduce an arguments structure for nlmclnt_init()
Clean up: pass 5 arguments to nlmclnt_init() in a structure similar to the new nfs_client_initdata structure. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 0b3ce86f6fc..7a15832369e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -468,18 +468,21 @@ static int nfs_start_lockd(struct nfs_server *server)
{
struct nlm_host *host;
struct nfs_client *clp = server->nfs_client;
- u32 nfs_version = clp->rpc_ops->version;
- unsigned short protocol = server->flags & NFS_MOUNT_TCP ?
- IPPROTO_TCP : IPPROTO_UDP;
+ struct nlmclnt_initdata nlm_init = {
+ .hostname = clp->cl_hostname,
+ .address = (struct sockaddr *)&clp->cl_addr,
+ .addrlen = clp->cl_addrlen,
+ .protocol = server->flags & NFS_MOUNT_TCP ?
+ IPPROTO_TCP : IPPROTO_UDP,
+ .nfs_version = clp->rpc_ops->version,
+ };
- if (nfs_version > 3)
+ if (nlm_init.nfs_version > 3)
return 0;
if (server->flags & NFS_MOUNT_NONLM)
return 0;
- host = nlmclnt_init(clp->cl_hostname,
- (struct sockaddr *)&clp->cl_addr,
- clp->cl_addrlen, protocol, nfs_version);
+ host = nlmclnt_init(&nlm_init);
if (IS_ERR(host))
return PTR_ERR(host);