SUNRPC: Ensure call_connect_status() deals correctly with SOFTCONN tasks
authorSteve Dickson <steved@redhat.com>
Thu, 20 Mar 2014 15:23:03 +0000 (11:23 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 20 Mar 2014 15:46:52 +0000 (11:46 -0400)
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>
net/sunrpc/clnt.c

index ef96568902c5bdbf057bf5bc9703b547c372a706..62f86793b708d02942fd282a8c323e9a256ba2f5 100644 (file)
@@ -1802,10 +1802,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:
This page took 0.025971 seconds and 5 git commands to generate.