From: Trond Myklebust Date: Tue, 23 Oct 2012 15:35:47 +0000 (-0400) Subject: SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT X-Git-Tag: v3.6.5~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a340197a85e4a27b3f974ffb6ab0308cc3f2edbc;p=thirdparty%2Fkernel%2Fstable.git SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT commit d0bea455dd48da1ecbd04fedf00eb89437455fdc upstream. This is needed to ensure that we call xprt_connect() upon the next call to call_connect(). Signed-off-by: Trond Myklebust Tested-by: Chris Perl Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 7847344d0fa9c..f08e42481759b 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1522,6 +1522,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: /*