diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-22 17:32:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-22 17:32:15 -0400 |
commit | 9092131f7ea2f9e92a510ae13ac4d20165aa921c (patch) | |
tree | 4bcac80a227d320b69454057cdcef41ef43c6c85 /net/sunrpc/pmap_clnt.c | |
parent | f1b04770b0d073a9d70e5b3b873d274c1c19e1f6 (diff) | |
parent | eadf4598e7ec37a234e70e965bd335860e58bda4 (diff) |
Merge rsync://client.linux-nfs.org/pub/linux/nfs-2.6
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; |