diff options
Diffstat (limited to 'net/sunrpc/pmap_clnt.c')
-rw-r--r-- | net/sunrpc/pmap_clnt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c index d0b1d2c34a4d..4e81f2766923 100644 --- a/net/sunrpc/pmap_clnt.c +++ b/net/sunrpc/pmap_clnt.c | |||
@@ -53,6 +53,9 @@ rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt) | |||
53 | task->tk_pid, clnt->cl_server, | 53 | task->tk_pid, clnt->cl_server, |
54 | map->pm_prog, map->pm_vers, map->pm_prot); | 54 | map->pm_prog, map->pm_vers, map->pm_prot); |
55 | 55 | ||
56 | /* Autobind on cloned rpc clients is discouraged */ | ||
57 | BUG_ON(clnt->cl_parent != clnt); | ||
58 | |||
56 | spin_lock(&pmap_lock); | 59 | spin_lock(&pmap_lock); |
57 | if (map->pm_binding) { | 60 | if (map->pm_binding) { |
58 | rpc_sleep_on(&map->pm_bindwait, task, NULL, NULL); | 61 | rpc_sleep_on(&map->pm_bindwait, task, NULL, NULL); |
@@ -207,12 +210,10 @@ pmap_create(char *hostname, struct sockaddr_in *srvaddr, int proto) | |||
207 | xprt->addr.sin_port = htons(RPC_PMAP_PORT); | 210 | xprt->addr.sin_port = htons(RPC_PMAP_PORT); |
208 | 211 | ||
209 | /* printk("pmap: create clnt\n"); */ | 212 | /* printk("pmap: create clnt\n"); */ |
210 | clnt = rpc_create_client(xprt, hostname, | 213 | clnt = rpc_new_client(xprt, hostname, |
211 | &pmap_program, RPC_PMAP_VERSION, | 214 | &pmap_program, RPC_PMAP_VERSION, |
212 | RPC_AUTH_UNIX); | 215 | RPC_AUTH_UNIX); |
213 | if (IS_ERR(clnt)) { | 216 | if (!IS_ERR(clnt)) { |
214 | xprt_destroy(xprt); | ||
215 | } else { | ||
216 | clnt->cl_softrtry = 1; | 217 | clnt->cl_softrtry = 1; |
217 | clnt->cl_chatty = 1; | 218 | clnt->cl_chatty = 1; |
218 | clnt->cl_oneshot = 1; | 219 | clnt->cl_oneshot = 1; |