Commit ef803670 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: TCP clear XPRT_CLOSE_WAIT when the socket is closed for writes

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 3b948ae5
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment