summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/pmap_clnt.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
commit230e5ab6a084ed50470f101934782dbf54b0d06b (patch)
tree5dd821c8d33f450470588e7a543f74bf74306e9e /net/sunrpc/pmap_clnt.c
parentc9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff)
Merge with Linux 2.1.67.
Diffstat (limited to 'net/sunrpc/pmap_clnt.c')
-rw-r--r--net/sunrpc/pmap_clnt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c
index 4a05efd9c..2bbe9d50a 100644
--- a/net/sunrpc/pmap_clnt.c
+++ b/net/sunrpc/pmap_clnt.c
@@ -54,15 +54,16 @@ rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt)
}
clnt->cl_binding = 1;
- task->tk_status = 0;
- if (!(pmap_clnt = pmap_create(clnt->cl_server, sap, map->pm_prot))) {
- task->tk_status = -EACCES;
+ task->tk_status = -EACCES; /* why set this? returns -EIO below */
+ if (!(pmap_clnt = pmap_create(clnt->cl_server, sap, map->pm_prot)))
goto bailout;
- }
- if (!(child = rpc_new_child(pmap_clnt, task))) {
- rpc_destroy_client(pmap_clnt);
+ task->tk_status = 0;
+
+ /*
+ * Note: rpc_new_child will release client after a failure.
+ */
+ if (!(child = rpc_new_child(pmap_clnt, task)))
goto bailout;
- }
/* Setup the call info struct */
rpc_call_setup(child, PMAP_GETPORT, map, &clnt->cl_port, 0);