Commit 04266473 authored by Trond Myklebust's avatar Trond Myklebust

lockd: Make lockd use rpc_new_client() instead of rpc_create_client

When doing NLM_GRANTED requests, lockd may end up blocking if we use
rpc_create_client() due to the synchronous call to rpc_ping(). Instead, use
rpc_new_client().
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 686517f1
...@@ -191,11 +191,12 @@ nlm_bind_host(struct nlm_host *host) ...@@ -191,11 +191,12 @@ nlm_bind_host(struct nlm_host *host)
xprt->resvport = 1; /* NLM requires a reserved port */ xprt->resvport = 1; /* NLM requires a reserved port */
/* Existing NLM servers accept AUTH_UNIX only */ /* Existing NLM servers accept AUTH_UNIX only */
clnt = rpc_create_client(xprt, host->h_name, &nlm_program, clnt = rpc_new_client(xprt, host->h_name, &nlm_program,
host->h_version, RPC_AUTH_UNIX); host->h_version, RPC_AUTH_UNIX);
if (IS_ERR(clnt)) if (IS_ERR(clnt))
goto forgetit; goto forgetit;
clnt->cl_autobind = 1; /* turn on pmap queries */ clnt->cl_autobind = 1; /* turn on pmap queries */
clnt->cl_softrtry = 1; /* All queries are soft */
host->h_rpcclnt = clnt; host->h_rpcclnt = clnt;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment