[PATCH 4.1 070/159] SUNRPC: xs_reset_transport must mark the connection as disconnected

Greg Kroah-Hartman
2015-09-26T21:10:40Z

From: Trond Myklebust <trond.myklebust@primarydata.com>

commit 0c78789e3a030615c6650fde89546cadf40ec2cc upstream.

In case the reconnection attempt fails.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
net/sunrpc/xprtsock.c | 1 +
1 file changed, 1 insertion(+)

--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -834,6 +834,7 @@ static void xs_reset_transport(struct so
sk->sk_user_data = NULL;

xs_restore_old_callbacks(transport, sk);
+ xprt_clear_connected(xprt);
write_unlock_bh(&sk->sk_callback_lock);
xs_sock_reset_connection_flags(xprt);