SUNRPC: Ensure our task is notified when an rpcbind call is done

If another task is busy in rpcb_getport_async number, it is more efficient
to have it wake us up when it has finished instead of arbitrarily sleeping
for 5 seconds.

Also ensure that rpcb_wake_rpcbind_waiters() is called regardless of
whether or not rpcb_getport_done() gets called.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2008-07-07 12:18:53 -04:00
parent f45663ce5f
commit 381ba74af5
2 changed files with 23 additions and 23 deletions

View File

@@ -942,11 +942,9 @@ call_bind_status(struct rpc_task *task)
}
switch (task->tk_status) {
case -EAGAIN:
dprintk("RPC: %5u rpcbind waiting for another request "
"to finish\n", task->tk_pid);
/* avoid busy-waiting here -- could be a network outage. */
rpc_delay(task, 5*HZ);
case -ENOMEM:
dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid);
rpc_delay(task, HZ >> 2);
goto retry_timeout;
case -EACCES:
dprintk("RPC: %5u remote rpcbind: RPC program/version "