]> git.ipfire.org Git - people/ms/linux.git/commitdiff
SUNRPC: Handle EPIPE in xprt_connect_status
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 3 Jul 2014 04:02:57 +0000 (00:02 -0400)
committerJiri Slaby <jslaby@suse.cz>
Mon, 16 Feb 2015 14:12:14 +0000 (15:12 +0100)
commit 2fc193cf924ea6eb74f6a0cf73b94b2e62938ae5 upstream.

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>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/sunrpc/clnt.c
net/sunrpc/xprt.c

index 07a1d5ad2513c157f0d2419cefed5e8d1cba660e..8724ef8573608027225cfb35b6a031e99ac911f7 100644 (file)
@@ -1709,6 +1709,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 92ed62ee5a32c37adb64287415d264f8f7c6dfc5..8615b9df4968517afea8ee10aeeea7b400e0e6be 100644 (file)
@@ -750,6 +750,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;