sunrpc: fix loss of task->tk_status after rpc_delay call in xprt_alloc_slot
[pandora-kernel.git] / net / sunrpc / xprt.c
index c64c0ef..3ac9789 100644 (file)
@@ -977,15 +977,16 @@ static void xprt_alloc_slot(struct rpc_task *task)
                goto out_init_req;
        switch (PTR_ERR(req)) {
        case -ENOMEM:
-               rpc_delay(task, HZ >> 2);
                dprintk("RPC:       dynamic allocation of request slot "
                                "failed! Retrying\n");
+               task->tk_status = -ENOMEM;
                break;
        case -EAGAIN:
                rpc_sleep_on(&xprt->backlog, task, NULL);
                dprintk("RPC:       waiting for request slot\n");
+       default:
+               task->tk_status = -EAGAIN;
        }
-       task->tk_status = -EAGAIN;
        return;
 out_init_req:
        task->tk_status = 0;