sunrpc: fix loss of task->tk_status after rpc_delay call in xprt_alloc_slot
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 19 May 2012 16:12:53 +0000 (12:12 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 10 Jun 2012 13:41:32 +0000 (14:41 +0100)
commitb35e0437787ca030484a278d052d3aada0bb9947
treea45910983f27a3d0f7649635a7287a12bc416c98
parent90f560e0729cc5483324673cb13522b8abcd8ca5
sunrpc: fix loss of task->tk_status after rpc_delay call in xprt_alloc_slot

commit 1afeaf5c29aa07db25760d2fbed5c08a3aec3498 upstream.

xprt_alloc_slot will call rpc_delay() to make the task wait a bit before
retrying when it gets back an -ENOMEM error from xprt_dynamic_alloc_slot.
The problem is that rpc_delay will clear the task->tk_status, causing
call_reserveresult to abort the task.

The solution is simply to let call_reserveresult handle the ENOMEM error
directly.

Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/sunrpc/clnt.c
net/sunrpc/xprt.c