aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/rpcb_clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-09 19:49:36 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:29 -0400
commit90c5755ff5111ffdcca10a1e8a823dba29f37b6d (patch)
treea3ca80b629d11e341fa2bcdf30e0d712dcccc3ba /net/sunrpc/rpcb_clnt.c
parent848f1fe6be2e290691bb6c13cbb8fd92bd0cfaab (diff)
SUNRPC: Kill rpc_clnt->cl_oneshot
Replace it with explicit calls to rpc_shutdown_client() or rpc_destroy_client() (for the case of asynchronous calls). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/rpcb_clnt.c')
-rw-r--r--net/sunrpc/rpcb_clnt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 6c7aa8a1f0c6..00853a326499 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -184,8 +184,7 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
184 .program = &rpcb_program, 184 .program = &rpcb_program,
185 .version = version, 185 .version = version,
186 .authflavor = RPC_AUTH_UNIX, 186 .authflavor = RPC_AUTH_UNIX,
187 .flags = (RPC_CLNT_CREATE_ONESHOT | 187 .flags = RPC_CLNT_CREATE_NOPING,
188 RPC_CLNT_CREATE_NOPING),
189 }; 188 };
190 189
191 ((struct sockaddr_in *)srvaddr)->sin_port = htons(RPCBIND_PORT); 190 ((struct sockaddr_in *)srvaddr)->sin_port = htons(RPCBIND_PORT);
@@ -238,6 +237,7 @@ int rpcb_register(u32 prog, u32 vers, int prot, unsigned short port, int *okay)
238 237
239 error = rpc_call_sync(rpcb_clnt, &msg, 0); 238 error = rpc_call_sync(rpcb_clnt, &msg, 0);
240 239
240 rpc_shutdown_client(rpcb_clnt);
241 if (error < 0) 241 if (error < 0)
242 printk(KERN_WARNING "RPC: failed to contact local rpcbind " 242 printk(KERN_WARNING "RPC: failed to contact local rpcbind "
243 "server (errno %d).\n", -error); 243 "server (errno %d).\n", -error);
@@ -286,6 +286,7 @@ int rpcb_getport_external(struct sockaddr_in *sin, __u32 prog,
286 return PTR_ERR(rpcb_clnt); 286 return PTR_ERR(rpcb_clnt);
287 287
288 status = rpc_call_sync(rpcb_clnt, &msg, 0); 288 status = rpc_call_sync(rpcb_clnt, &msg, 0);
289 rpc_shutdown_client(rpcb_clnt);
289 290
290 if (status >= 0) { 291 if (status >= 0) {
291 if (map.r_port != 0) 292 if (map.r_port != 0)
@@ -379,6 +380,7 @@ void rpcb_getport(struct rpc_task *task)
379 } 380 }
380 381
381 child = rpc_run_task(rpcb_clnt, RPC_TASK_ASYNC, &rpcb_getport_ops, map); 382 child = rpc_run_task(rpcb_clnt, RPC_TASK_ASYNC, &rpcb_getport_ops, map);
383 rpc_destroy_client(rpcb_clnt);
382 if (IS_ERR(child)) { 384 if (IS_ERR(child)) {
383 status = -EIO; 385 status = -EIO;
384 dprintk("RPC: %5u rpcb_getport rpc_run_task failed\n", 386 dprintk("RPC: %5u rpcb_getport rpc_run_task failed\n",