diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 02b071dbdd225b49c4d7ea4fe215013c3a3e847e..5fb969f8a5adf96daeb485020fac23816756b7bc 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2099,6 +2099,10 @@ static void xs_tcp_shutdown(struct rpc_xprt *xprt) if (sock == NULL) return; + if (!xprt->reuseport) { + xs_close(xprt); + return; + } switch (skst) { default: kernel_sock_shutdown(sock, SHUT_RDWR);