SUNRPC: xs_reset_transport must mark the connection as disconnected
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 29 Aug 2015 20:36:30 +0000 (13:36 -0700)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 29 Aug 2015 20:40:32 +0000 (13:40 -0700)
In case the reconnection attempt fails.

Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/xprtsock.c

index 723df7cb096df82d812c2eccf82cb798da1faa4a..214ca9dfb14ec7addc07f79cf31f98822fc91f58 100644 (file)
@@ -829,6 +829,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);
        xs_sock_reset_connection_flags(xprt);