mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
RPC/RDMA: return a consistent error, when connect fails.
The xprt_connect call path does not expect such errors as ECONNREFUSED to be returned from failed transport connection attempts, otherwise it translates them to EIO and signals fatal errors. For example, mount.nfs prints simply "internal error". Translate all such errors to ENOTCONN from RPC/RDMA to match sockets behavior. Signed-off-by: Tom Talpey <talpey@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
9191ca3b38
commit
926449ba66
1 changed files with 1 additions and 1 deletions
|
@ -699,7 +699,7 @@ rpcrdma_conn_func(struct rpcrdma_ep *ep)
|
||||||
xprt_wake_pending_tasks(xprt, 0);
|
xprt_wake_pending_tasks(xprt, 0);
|
||||||
} else {
|
} else {
|
||||||
if (xprt_test_and_clear_connected(xprt))
|
if (xprt_test_and_clear_connected(xprt))
|
||||||
xprt_wake_pending_tasks(xprt, ep->rep_connected);
|
xprt_wake_pending_tasks(xprt, -ENOTCONN);
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&xprt->transport_lock);
|
spin_unlock_bh(&xprt->transport_lock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue