SUNRPC: Report network/connection errors correctly for SOFTCONN rpc tasks
[firefly-linux-kernel-4.4.55.git] / net / sunrpc / xprtsock.c
index c1d8476b76929b4300d967dd795aa6c2ce38f7a0..3081620cb02c78224b9d0a88a23be89f330c17e5 100644 (file)
@@ -2202,10 +2202,6 @@ static void xs_tcp_setup_socket(struct work_struct *work)
                 */
                xs_tcp_force_close(xprt);
                break;
-       case -ECONNREFUSED:
-       case -ECONNRESET:
-       case -ENETUNREACH:
-               /* retry with existing socket, after a delay */
        case 0:
        case -EINPROGRESS:
        case -EALREADY:
@@ -2216,6 +2212,10 @@ static void xs_tcp_setup_socket(struct work_struct *work)
                /* Happens, for instance, if the user specified a link
                 * local IPv6 address without a scope-id.
                 */
+       case -ECONNREFUSED:
+       case -ECONNRESET:
+       case -ENETUNREACH:
+               /* retry with existing socket, after a delay */
                goto out;
        }
 out_eagain: