Browse Source

SUNRPC: Ensure xprt_connect_status handles all potential connection errors

Currently, xprt_connect_status will convert connection error values such
as ECONNREFUSED, ECONNRESET, ... into EIO, which means that they never
get handled.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Trond Myklebust 11 years ago
parent
commit
0fe8d04e8c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      net/sunrpc/xprt.c

+ 5 - 0
net/sunrpc/xprt.c

@@ -749,6 +749,11 @@ static void xprt_connect_status(struct rpc_task *task)
 	}
 	}
 
 
 	switch (task->tk_status) {
 	switch (task->tk_status) {
+	case -ECONNREFUSED:
+	case -ECONNRESET:
+	case -ECONNABORTED:
+	case -ENETUNREACH:
+	case -EHOSTUNREACH:
 	case -EAGAIN:
 	case -EAGAIN:
 		dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
 		dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
 		break;
 		break;