SUNRPC: Handle EPIPE in xprt_connect_status
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 3 Jul 2014 04:02:57 +0000 (00:02 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 3 Jul 2014 04:11:35 +0000 (00:11 -0400)
The callback handler xs_error_report() can end up propagating an EPIPE
error by means of the call to xprt_wake_pending_tasks(). Ensure that
xprt_connect_status() does not automatically convert this into an
EIO error.

Reported-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/clnt.c
net/sunrpc/xprt.c

index 575e63f..488ddee 100644 (file)
@@ -1814,6 +1814,7 @@ call_connect_status(struct rpc_task *task)
        case -ENETUNREACH:
        case -EHOSTUNREACH:
        case -ENOBUFS:
+       case -EPIPE:
                if (RPC_IS_SOFTCONN(task))
                        break;
                /* retry with existing socket, after a delay */
index c3b2b33..c5b2916 100644 (file)
@@ -744,6 +744,7 @@ static void xprt_connect_status(struct rpc_task *task)
        case -ECONNABORTED:
        case -ENETUNREACH:
        case -EHOSTUNREACH:
+       case -EPIPE:
        case -EAGAIN:
                dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
                break;