SUNRPC: xs_reset_transport must mark the connection as disconnected

commit 0c78789e3a upstream.

In case the reconnection attempt fails.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
[bwh: Backported to 3.2: add local variable xprt]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 9434e4855e)

Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
Trond Myklebust 2015-08-29 13:36:30 -07:00 committed by Willy Tarreau
parent 1c16d9c6fc
commit 7af536c9e9

View File

@ -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;