aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-07 12:18:53 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-09 12:09:45 -0400
commit381ba74af55e58bca4c01553835a360a9f6fbb07 (patch)
tree56e5f5159432ebb350af4adf330afa4f50b77a54 /net/sunrpc/clnt.c
parentf45663ce5fb30f76a3414ab3ac69f4dd320e760a (diff)
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>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 09631f6e30e9..76739e928d0d 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -942,11 +942,9 @@ call_bind_status(struct rpc_task *task)
942 } 942 }
943 943
944 switch (task->tk_status) { 944 switch (task->tk_status) {
945 case -EAGAIN: 945 case -ENOMEM:
946 dprintk("RPC: %5u rpcbind waiting for another request " 946 dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid);
947 "to finish\n", task->tk_pid); 947 rpc_delay(task, HZ >> 2);
948 /* avoid busy-waiting here -- could be a network outage. */
949 rpc_delay(task, 5*HZ);
950 goto retry_timeout; 948 goto retry_timeout;
951 case -EACCES: 949 case -EACCES:
952 dprintk("RPC: %5u remote rpcbind: RPC program/version " 950 dprintk("RPC: %5u remote rpcbind: RPC program/version "