diff options
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 8e58b0b5460b..9f3e615d3e09 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1722,20 +1722,19 @@ static void xs_tcp_connect_worker4(struct work_struct *work) | |||
1722 | xprt, -status, xprt_connected(xprt), | 1722 | xprt, -status, xprt_connected(xprt), |
1723 | sock->sk->sk_state); | 1723 | sock->sk->sk_state); |
1724 | switch (status) { | 1724 | switch (status) { |
1725 | case -ECONNREFUSED: | ||
1726 | case -ECONNRESET: | ||
1727 | case -ENETUNREACH: | ||
1728 | /* retry with existing socket, after a delay */ | ||
1725 | case 0: | 1729 | case 0: |
1726 | case -EINPROGRESS: | 1730 | case -EINPROGRESS: |
1727 | case -EALREADY: | 1731 | case -EALREADY: |
1728 | goto out_clear; | 1732 | goto out_clear; |
1729 | case -ECONNREFUSED: | ||
1730 | case -ECONNRESET: | ||
1731 | /* retry with existing socket, after a delay */ | ||
1732 | break; | ||
1733 | default: | ||
1734 | /* get rid of existing socket, and retry */ | ||
1735 | xs_tcp_shutdown(xprt); | ||
1736 | printk("%s: connect returned unhandled error %d\n", | ||
1737 | __func__, status); | ||
1738 | } | 1733 | } |
1734 | /* get rid of existing socket, and retry */ | ||
1735 | xs_tcp_shutdown(xprt); | ||
1736 | printk("%s: connect returned unhandled error %d\n", | ||
1737 | __func__, status); | ||
1739 | status = -EAGAIN; | 1738 | status = -EAGAIN; |
1740 | out: | 1739 | out: |
1741 | xprt_wake_pending_tasks(xprt, status); | 1740 | xprt_wake_pending_tasks(xprt, status); |
@@ -1783,20 +1782,19 @@ static void xs_tcp_connect_worker6(struct work_struct *work) | |||
1783 | dprintk("RPC: %p connect status %d connected %d sock state %d\n", | 1782 | dprintk("RPC: %p connect status %d connected %d sock state %d\n", |
1784 | xprt, -status, xprt_connected(xprt), sock->sk->sk_state); | 1783 | xprt, -status, xprt_connected(xprt), sock->sk->sk_state); |
1785 | switch (status) { | 1784 | switch (status) { |
1785 | case -ECONNREFUSED: | ||
1786 | case -ECONNRESET: | ||
1787 | case -ENETUNREACH: | ||
1788 | /* retry with existing socket, after a delay */ | ||
1786 | case 0: | 1789 | case 0: |
1787 | case -EINPROGRESS: | 1790 | case -EINPROGRESS: |
1788 | case -EALREADY: | 1791 | case -EALREADY: |
1789 | goto out_clear; | 1792 | goto out_clear; |
1790 | case -ECONNREFUSED: | ||
1791 | case -ECONNRESET: | ||
1792 | /* retry with existing socket, after a delay */ | ||
1793 | break; | ||
1794 | default: | ||
1795 | /* get rid of existing socket, and retry */ | ||
1796 | xs_tcp_shutdown(xprt); | ||
1797 | printk("%s: connect returned unhandled error %d\n", | ||
1798 | __func__, status); | ||
1799 | } | 1793 | } |
1794 | /* get rid of existing socket, and retry */ | ||
1795 | xs_tcp_shutdown(xprt); | ||
1796 | printk("%s: connect returned unhandled error %d\n", | ||
1797 | __func__, status); | ||
1800 | status = -EAGAIN; | 1798 | status = -EAGAIN; |
1801 | out: | 1799 | out: |
1802 | xprt_wake_pending_tasks(xprt, status); | 1800 | xprt_wake_pending_tasks(xprt, status); |