aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2014-03-20 11:23:03 -0400
committerJiri Slaby <jslaby@suse.cz>2015-02-16 15:12:13 +0100
commit94feca620813d8e56911a839d3b60ac42a950b64 (patch)
tree07799a0997d50990b8315f5d648d277048071ce5
parent97034d21e60e27ff15f8caad7c101fdd29103651 (diff)
SUNRPC: Ensure call_connect_status() deals correctly with SOFTCONN tasks
commit 1fa3e2eb9db07f30a605c66d1a2fdde4b24e74d5 upstream. Don't schedule an rpc_delay before checking to see if the task is a SOFTCONN because the tk_callback from the delay (__rpc_atrun) clears the task status before the rpc_exit_task can be run. Signed-off-by: Steve Dickson <steved@redhat.com> Fixes: 561ec1603171c (SUNRPC: call_connect_status should recheck...) Link: http://lkml.kernel.org/r/5329CF7C.7090308@RedHat.com Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r--net/sunrpc/clnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 9aa12c57f6a7..285040c71f38 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1707,10 +1707,10 @@ call_connect_status(struct rpc_task *task)
case -ECONNABORTED:
case -ENETUNREACH:
case -EHOSTUNREACH:
- /* retry with existing socket, after a delay */
- rpc_delay(task, 3*HZ);
if (RPC_IS_SOFTCONN(task))
break;
+ /* retry with existing socket, after a delay */
+ rpc_delay(task, 3*HZ);
case -EAGAIN:
/* Check for timeouts before looping back to call_bind */
case -ETIMEDOUT: