diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-12-03 18:49:00 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-12-05 07:11:12 -0500 |
commit | 79462857eb547e5d17fc8445b9768615e02dc1cf (patch) | |
tree | 0f9dfe922df7ec9ca2160d6edda7eb1aac848e8b /net | |
parent | dfcf0380858b4e760ae02665649d884d1baa50c9 (diff) |
SUNRPC: Don't force a redundant disconnection in xs_read_stream()
If the connection is broken, then xs_tcp_state_change() will take care
of scheduling the socket close as soon as appropriate. xs_read_stream()
just needs to report the error.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtsock.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 92d08be2384d..8a5e823e0b33 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -634,13 +634,7 @@ xs_read_stream(struct sock_xprt *transport, int flags) | |||
634 | transport->recv.len = 0; | 634 | transport->recv.len = 0; |
635 | return read; | 635 | return read; |
636 | out_err: | 636 | out_err: |
637 | switch (ret) { | 637 | return ret != 0 ? ret : -ESHUTDOWN; |
638 | case 0: | ||
639 | case -ESHUTDOWN: | ||
640 | xprt_force_disconnect(&transport->xprt); | ||
641 | return -ESHUTDOWN; | ||
642 | } | ||
643 | return ret; | ||
644 | } | 638 | } |
645 | 639 | ||
646 | static void xs_stream_data_receive(struct sock_xprt *transport) | 640 | static void xs_stream_data_receive(struct sock_xprt *transport) |