Commit 7af536c9 authored by Trond Myklebust's avatar Trond Myklebust Committed by Willy Tarreau

SUNRPC: xs_reset_transport must mark the connection as disconnected

commit 0c78789e upstream.

In case the reconnection attempt fails.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
[bwh: Backported to 3.2: add local variable xprt]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
(cherry picked from commit 9434e485)
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 1c16d9c6
......@@ -734,6 +734,7 @@ static void xs_reset_transport(struct sock_xprt *transport)
{
struct socket *sock = transport->sock;
struct sock *sk = transport->inet;
struct rpc_xprt *xprt = &transport->xprt;
if (sk == NULL)
return;
......@@ -747,6 +748,7 @@ static void xs_reset_transport(struct sock_xprt *transport)
sk->sk_user_data = NULL;
xs_restore_old_callbacks(transport, sk);
xprt_clear_connected(xprt);
write_unlock_bh(&sk->sk_callback_lock);
sk->sk_no_check = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment