|
@@ -101,14 +101,14 @@ void rpc_getport(struct rpc_task *task)
|
|
/* Autobind on cloned rpc clients is discouraged */
|
|
/* Autobind on cloned rpc clients is discouraged */
|
|
BUG_ON(clnt->cl_parent != clnt);
|
|
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
|
|
/* Put self on queue before sending rpcbind request, in case
|
|
* pmap_getport_done completes before we return from rpc_run_task */
|
|
* pmap_getport_done completes before we return from rpc_run_task */
|
|
rpc_sleep_on(&xprt->binding, task, NULL, NULL);
|
|
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 */
|
|
/* Someone else may have bound if we slept */
|
|
status = 0;
|
|
status = 0;
|
|
if (xprt_bound(xprt))
|
|
if (xprt_bound(xprt))
|
|
@@ -143,8 +143,9 @@ bailout:
|
|
pmap_map_free(map);
|
|
pmap_map_free(map);
|
|
xprt_put(xprt);
|
|
xprt_put(xprt);
|
|
bailout_nofree:
|
|
bailout_nofree:
|
|
- task->tk_status = status;
|
|
|
|
pmap_wake_portmap_waiters(xprt, status);
|
|
pmap_wake_portmap_waiters(xprt, status);
|
|
|
|
+bailout_nowake:
|
|
|
|
+ task->tk_status = status;
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_ROOT_NFS
|
|
#ifdef CONFIG_ROOT_NFS
|