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

SUNRPC: Prevent SYN+SYNACK+RST storms

Add a shutdown() call before we release the socket in order to ensure the
reset is sent before we try to reconnect.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 0c78789e
...@@ -822,6 +822,8 @@ static void xs_reset_transport(struct sock_xprt *transport) ...@@ -822,6 +822,8 @@ static void xs_reset_transport(struct sock_xprt *transport)
if (atomic_read(&transport->xprt.swapper)) if (atomic_read(&transport->xprt.swapper))
sk_clear_memalloc(sk); sk_clear_memalloc(sk);
kernel_sock_shutdown(sock, SHUT_RDWR);
write_lock_bh(&sk->sk_callback_lock); write_lock_bh(&sk->sk_callback_lock);
transport->inet = NULL; transport->inet = NULL;
transport->sock = NULL; transport->sock = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册