Explorar o código

SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT

This is needed to ensure that we call xprt_connect() upon the next
call to call_connect().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Tested-by: Chris Perl <chris.perl@gmail.com>
Trond Myklebust %!s(int64=12) %!d(string=hai) anos
pai
achega
d0bea455dd
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      net/sunrpc/xprtsock.c

+ 1 - 0
net/sunrpc/xprtsock.c

@@ -1516,6 +1516,7 @@ static void xs_tcp_state_change(struct sock *sk)
 	case TCP_CLOSE_WAIT:
 		/* The server initiated a shutdown of the socket */
 		xprt->connect_cookie++;
+		clear_bit(XPRT_CONNECTED, &xprt->state);
 		xs_tcp_force_close(xprt);
 	case TCP_CLOSING:
 		/*