aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-11 15:29:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-19 15:17:36 -0400
commit55420c24a0d4d1fce70ca713f84aa00b6b74a70e (patch)
tree9e7e931122cb77e7ae1249b6dde81d83f60a894d /net/sunrpc/xprtsock.c
parentb61d59fffd3e5b6037c92b4c840605831de8a251 (diff)
SUNRPC: Ensure we close the socket on EPIPE errors too...
As long as one task is holding the socket lock, then calls to xprt_force_disconnect(xprt) will not succeed in shutting down the socket. In particular, this would mean that a server initiated shutdown will not succeed until the lock is relinquished. In order to avoid the deadlock, we should ensure that xs_tcp_send_request() closes the socket on EPIPE errors too. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index f05a56e597ef..fbc8725c20cb 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -726,10 +726,10 @@ static int xs_tcp_send_request(struct rpc_task *task)
726 dprintk("RPC: sendmsg returned unrecognized error %d\n", 726 dprintk("RPC: sendmsg returned unrecognized error %d\n",
727 -status); 727 -status);
728 case -ECONNRESET: 728 case -ECONNRESET:
729 case -EPIPE:
729 xs_tcp_shutdown(xprt); 730 xs_tcp_shutdown(xprt);
730 case -ECONNREFUSED: 731 case -ECONNREFUSED:
731 case -ENOTCONN: 732 case -ENOTCONN:
732 case -EPIPE:
733 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags); 733 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
734 } 734 }
735out: 735out: