|
Johannes Thumshirn |
4e752d |
From: Ursula Braun <ubraun@linux.vnet.ibm.com>
|
|
Johannes Thumshirn |
4e752d |
Date: Wed, 24 Jan 2018 10:28:17 +0100
|
|
Johannes Thumshirn |
4e752d |
Subject: net/smc: continue waiting if peer signals write_shutdown
|
|
Johannes Thumshirn |
4e752d |
Patch-mainline: v4.16-rc1
|
|
Johannes Thumshirn |
4e752d |
Git-commit: aa377e682d0703452642d4059a94ab7fdaa90b89
|
|
Johannes Thumshirn |
4e752d |
References: bsc#1096003, FATE#325023, LTC#164003
|
|
Johannes Thumshirn |
4e752d |
|
|
Johannes Thumshirn |
4e752d |
If the peer sends a shutdown WRITE, this should not affect sending
|
|
Johannes Thumshirn |
4e752d |
in general, and waiting for send buffer space in particular.
|
|
Johannes Thumshirn |
4e752d |
Stop waiting of the local socket for send buffer space only, if peer
|
|
Johannes Thumshirn |
4e752d |
signals closing, but not if peer signals just shutdown WRITE.
|
|
Johannes Thumshirn |
4e752d |
|
|
Johannes Thumshirn |
4e752d |
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
|
|
Johannes Thumshirn |
4e752d |
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Johannes Thumshirn |
4e752d |
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
|
|
Johannes Thumshirn |
4e752d |
---
|
|
Johannes Thumshirn |
4e752d |
net/smc/smc_tx.c | 4 ++--
|
|
Johannes Thumshirn |
4e752d |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Johannes Thumshirn |
4e752d |
|
|
Johannes Thumshirn |
4e752d |
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c
|
|
Johannes Thumshirn |
4e752d |
index 2e50fddf8ce9..fea6482233a6 100644
|
|
Johannes Thumshirn |
4e752d |
--- a/net/smc/smc_tx.c
|
|
Johannes Thumshirn |
4e752d |
+++ b/net/smc/smc_tx.c
|
|
Johannes Thumshirn |
4e752d |
@@ -86,7 +86,7 @@ static int smc_tx_wait_memory(struct smc_sock *smc, int flags)
|
|
Johannes Thumshirn |
4e752d |
rc = -EPIPE;
|
|
Johannes Thumshirn |
4e752d |
break;
|
|
Johannes Thumshirn |
4e752d |
}
|
|
Johannes Thumshirn |
4e752d |
- if (conn->local_rx_ctrl.conn_state_flags.peer_conn_abort) {
|
|
Johannes Thumshirn |
4e752d |
+ if (smc_cdc_rxed_any_close(conn)) {
|
|
Johannes Thumshirn |
4e752d |
rc = -ECONNRESET;
|
|
Johannes Thumshirn |
4e752d |
break;
|
|
Johannes Thumshirn |
4e752d |
}
|
|
Johannes Thumshirn |
4e752d |
@@ -107,7 +107,7 @@ static int smc_tx_wait_memory(struct smc_sock *smc, int flags)
|
|
Johannes Thumshirn |
4e752d |
sk_wait_event(sk, &timeo,
|
|
Johannes Thumshirn |
4e752d |
sk->sk_err ||
|
|
Johannes Thumshirn |
4e752d |
(sk->sk_shutdown & SEND_SHUTDOWN) ||
|
|
Johannes Thumshirn |
4e752d |
- smc_cdc_rxed_any_close_or_senddone(conn) ||
|
|
Johannes Thumshirn |
4e752d |
+ smc_cdc_rxed_any_close(conn) ||
|
|
Johannes Thumshirn |
4e752d |
atomic_read(&conn->sndbuf_space),
|
|
Johannes Thumshirn |
4e752d |
&wait);
|
|
Johannes Thumshirn |
4e752d |
}
|
|
Johannes Thumshirn |
4e752d |
|