]> git.karo-electronics.de Git - karo-tx-linux.git/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)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:26:56 +0000 (23:26 +0000)
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: Ben Hutchings <ben@decadent.org.uk>
net/sunrpc/xprtsock.c

index d68b653af7bf59065935eb79755e76a9c84236d0..0795f811181ccf12fe152476c1d50a943c531ac6 100644 (file)
@@ -1528,6 +1528,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:
                /*