]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
SUNRPC: TCP clear XPRT_CLOSE_WAIT when the socket is closed for writes
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 31 Dec 2007 21:19:17 +0000 (16:19 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:05:25 +0000 (02:05 -0500)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtsock.c

index 721c5419765ec6a94645f51696f725a780338ada..25aae8c526e4c8bf7fcaaa78205822b6000acb0e 100644 (file)
@@ -1125,6 +1125,7 @@ static void xs_tcp_state_change(struct sock *sk)
                set_bit(XPRT_CLOSING, &xprt->state);
                smp_mb__before_clear_bit();
                clear_bit(XPRT_CONNECTED, &xprt->state);
+               clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
                smp_mb__after_clear_bit();
                break;
        case TCP_CLOSE_WAIT:
@@ -1139,6 +1140,7 @@ static void xs_tcp_state_change(struct sock *sk)
                break;
        case TCP_CLOSE:
                smp_mb__before_clear_bit();
+               clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
                clear_bit(XPRT_CLOSING, &xprt->state);
                smp_mb__after_clear_bit();
                /* Mark transport as closed and wake up all pending tasks */