Skip to content

Commit 0efeac2

Browse files
committed
SUNRPC: Ensure xs_tcp_shutdown() requests a full close of the connection
The previous behaviour left the connection half-open in order to try to scrape the last replies from the socket. Now that we have more reliable reconnection, change the behaviour to close down the socket faster. Signed-off-by: Trond Myklebust <[email protected]>
1 parent 505936f commit 0efeac2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/xprtsock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,15 +627,15 @@ static int xs_udp_send_request(struct rpc_task *task)
627627
* @xprt: transport
628628
*
629629
* Initiates a graceful shutdown of the TCP socket by calling the
630-
* equivalent of shutdown(SHUT_WR);
630+
* equivalent of shutdown(SHUT_RDWR);
631631
*/
632632
static void xs_tcp_shutdown(struct rpc_xprt *xprt)
633633
{
634634
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
635635
struct socket *sock = transport->sock;
636636

637637
if (sock != NULL) {
638-
kernel_sock_shutdown(sock, SHUT_WR);
638+
kernel_sock_shutdown(sock, SHUT_RDWR);
639639
trace_rpc_socket_shutdown(xprt, sock);
640640
}
641641
}

0 commit comments

Comments
 (0)