提交 ef803670 编写于 作者: T Trond Myklebust

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

Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 3b948ae5
...@@ -1125,6 +1125,7 @@ static void xs_tcp_state_change(struct sock *sk) ...@@ -1125,6 +1125,7 @@ static void xs_tcp_state_change(struct sock *sk)
set_bit(XPRT_CLOSING, &xprt->state); set_bit(XPRT_CLOSING, &xprt->state);
smp_mb__before_clear_bit(); smp_mb__before_clear_bit();
clear_bit(XPRT_CONNECTED, &xprt->state); clear_bit(XPRT_CONNECTED, &xprt->state);
clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
smp_mb__after_clear_bit(); smp_mb__after_clear_bit();
break; break;
case TCP_CLOSE_WAIT: case TCP_CLOSE_WAIT:
...@@ -1139,6 +1140,7 @@ static void xs_tcp_state_change(struct sock *sk) ...@@ -1139,6 +1140,7 @@ static void xs_tcp_state_change(struct sock *sk)
break; break;
case TCP_CLOSE: case TCP_CLOSE:
smp_mb__before_clear_bit(); smp_mb__before_clear_bit();
clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
clear_bit(XPRT_CLOSING, &xprt->state); clear_bit(XPRT_CLOSING, &xprt->state);
smp_mb__after_clear_bit(); smp_mb__after_clear_bit();
/* Mark transport as closed and wake up all pending tasks */ /* Mark transport as closed and wake up all pending tasks */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册