aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-03-04 17:29:33 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-03-25 12:04:10 -0400
commit3ed5e2a2c394df4e03a680842c2d07a8680f133b (patch)
tree83050928d116f2079147f6de8c77860a4ec76f27 /net/sunrpc/xprtsock.c
parent1166fde6a923c30f4351515b6a9a1efc513e7d00 (diff)
SUNRPC: Report network/connection errors correctly for SOFTCONN rpc tasks
In the case of a SOFTCONN rpc task, we really want to ensure that it reports errors like ENETUNREACH back to the caller. Currently, only some of these errors are being reported back (connect errors are not), and they are being converted by the RPC layer into EIO. Reported-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index c1d8476b7692..3081620cb02c 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2202,10 +2202,6 @@ static void xs_tcp_setup_socket(struct work_struct *work)
2202 */ 2202 */
2203 xs_tcp_force_close(xprt); 2203 xs_tcp_force_close(xprt);
2204 break; 2204 break;
2205 case -ECONNREFUSED:
2206 case -ECONNRESET:
2207 case -ENETUNREACH:
2208 /* retry with existing socket, after a delay */
2209 case 0: 2205 case 0:
2210 case -EINPROGRESS: 2206 case -EINPROGRESS:
2211 case -EALREADY: 2207 case -EALREADY:
@@ -2216,6 +2212,10 @@ static void xs_tcp_setup_socket(struct work_struct *work)
2216 /* Happens, for instance, if the user specified a link 2212 /* Happens, for instance, if the user specified a link
2217 * local IPv6 address without a scope-id. 2213 * local IPv6 address without a scope-id.
2218 */ 2214 */
2215 case -ECONNREFUSED:
2216 case -ECONNRESET:
2217 case -ENETUNREACH:
2218 /* retry with existing socket, after a delay */
2219 goto out; 2219 goto out;
2220 } 2220 }
2221out_eagain: 2221out_eagain: