aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-02-09 09:26:39 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-02-09 09:31:11 -0500
commit0efeac261c3f79c44fe61ee869722b77805c7ddf (patch)
tree35fe34be1051c931e2d22ca5ba4c912300445017 /net/sunrpc
parent505936f59f1e4cd0ff92ae5abc7aae64fb74dbdb (diff)
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 <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtsock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 2f8db3499a17..3d83cbd32ef2 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -627,7 +627,7 @@ process_status:
627 * @xprt: transport 627 * @xprt: transport
628 * 628 *
629 * Initiates a graceful shutdown of the TCP socket by calling the 629 * Initiates a graceful shutdown of the TCP socket by calling the
630 * equivalent of shutdown(SHUT_WR); 630 * equivalent of shutdown(SHUT_RDWR);
631 */ 631 */
632static void xs_tcp_shutdown(struct rpc_xprt *xprt) 632static void xs_tcp_shutdown(struct rpc_xprt *xprt)
633{ 633{
@@ -635,7 +635,7 @@ static void xs_tcp_shutdown(struct rpc_xprt *xprt)
635 struct socket *sock = transport->sock; 635 struct socket *sock = transport->sock;
636 636
637 if (sock != NULL) { 637 if (sock != NULL) {
638 kernel_sock_shutdown(sock, SHUT_WR); 638 kernel_sock_shutdown(sock, SHUT_RDWR);
639 trace_rpc_socket_shutdown(xprt, sock); 639 trace_rpc_socket_shutdown(xprt, sock);
640 } 640 }
641} 641}