aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/clnt.c2
-rw-r--r--net/sunrpc/xprt.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index adf2990aceb..25302c80246 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1288,6 +1288,8 @@ call_reserveresult(struct rpc_task *task)
1288 } 1288 }
1289 1289
1290 switch (status) { 1290 switch (status) {
1291 case -ENOMEM:
1292 rpc_delay(task, HZ >> 2);
1291 case -EAGAIN: /* woken up; retry */ 1293 case -EAGAIN: /* woken up; retry */
1292 task->tk_action = call_reserve; 1294 task->tk_action = call_reserve;
1293 return; 1295 return;
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index b239e75c483..d7ccd7923ea 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -984,15 +984,16 @@ static void xprt_alloc_slot(struct rpc_task *task)
984 goto out_init_req; 984 goto out_init_req;
985 switch (PTR_ERR(req)) { 985 switch (PTR_ERR(req)) {
986 case -ENOMEM: 986 case -ENOMEM:
987 rpc_delay(task, HZ >> 2);
988 dprintk("RPC: dynamic allocation of request slot " 987 dprintk("RPC: dynamic allocation of request slot "
989 "failed! Retrying\n"); 988 "failed! Retrying\n");
989 task->tk_status = -ENOMEM;
990 break; 990 break;
991 case -EAGAIN: 991 case -EAGAIN:
992 rpc_sleep_on(&xprt->backlog, task, NULL); 992 rpc_sleep_on(&xprt->backlog, task, NULL);
993 dprintk("RPC: waiting for request slot\n"); 993 dprintk("RPC: waiting for request slot\n");
994 default:
995 task->tk_status = -EAGAIN;
994 } 996 }
995 task->tk_status = -EAGAIN;
996 return; 997 return;
997out_init_req: 998out_init_req:
998 task->tk_status = 0; 999 task->tk_status = 0;