]> git.hungrycats.org Git - linux/commitdiff
SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 23 Oct 2012 15:35:47 +0000 (11:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:09:57 +0000 (10:09 -0700)
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 <Trond.Myklebust@netapp.com>
Tested-by: Chris Perl <chris.perl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/xprtsock.c

index 7847344d0fa9ce67a6bb82bc5da8fdeb6d798a62..f08e42481759bd49755edeceaf67f2c0c95cd057 100644 (file)
@@ -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:
                /*