summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/pmap_clnt.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-01-18 10:34:51 +1100
committerDavid Woodhouse <dwmw2@infradead.org>2007-01-18 10:34:51 +1100
commit9cdf083f981b8d37b3212400a359368661385099 (patch)
treeaa15a6a08ad87e650dea40fb59b3180bef0d345b /net/sunrpc/pmap_clnt.c
parente499e01d234a31d59679b7b1e1cf628d917ba49a (diff)
parenta8b3485287731978899ced11f24628c927890e78 (diff)
downloadtalos-op-linux-9cdf083f981b8d37b3212400a359368661385099.tar.gz
talos-op-linux-9cdf083f981b8d37b3212400a359368661385099.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/sunrpc/pmap_clnt.c')
-rw-r--r--net/sunrpc/pmap_clnt.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c
index e52afab413de..3946ec3eb517 100644
--- a/net/sunrpc/pmap_clnt.c
+++ b/net/sunrpc/pmap_clnt.c
@@ -101,14 +101,14 @@ void rpc_getport(struct rpc_task *task)
/* Autobind on cloned rpc clients is discouraged */
BUG_ON(clnt->cl_parent != clnt);
+ status = -EACCES; /* tell caller to check again */
+ if (xprt_test_and_set_binding(xprt))
+ goto bailout_nowake;
+
/* Put self on queue before sending rpcbind request, in case
* pmap_getport_done completes before we return from rpc_run_task */
rpc_sleep_on(&xprt->binding, task, NULL, NULL);
- status = -EACCES; /* tell caller to check again */
- if (xprt_test_and_set_binding(xprt))
- goto bailout_nofree;
-
/* Someone else may have bound if we slept */
status = 0;
if (xprt_bound(xprt))
@@ -134,7 +134,7 @@ void rpc_getport(struct rpc_task *task)
child = rpc_run_task(pmap_clnt, RPC_TASK_ASYNC, &pmap_getport_ops, map);
if (IS_ERR(child))
goto bailout;
- rpc_release_task(child);
+ rpc_put_task(child);
task->tk_xprt->stat.bind_count++;
return;
@@ -143,8 +143,9 @@ bailout:
pmap_map_free(map);
xprt_put(xprt);
bailout_nofree:
- task->tk_status = status;
pmap_wake_portmap_waiters(xprt, status);
+bailout_nowake:
+ task->tk_status = status;
}
#ifdef CONFIG_ROOT_NFS
OpenPOWER on IntegriCloud