Skip to content

Commit aa377e6

Browse files
Ursula Braundavem330
authored andcommitted
net/smc: continue waiting if peer signals write_shutdown
If the peer sends a shutdown WRITE, this should not affect sending in general, and waiting for send buffer space in particular. Stop waiting of the local socket for send buffer space only, if peer signals closing, but not if peer signals just shutdown WRITE. Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bbb96bf commit aa377e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/smc/smc_tx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int smc_tx_wait_memory(struct smc_sock *smc, int flags)
8686
rc = -EPIPE;
8787
break;
8888
}
89-
if (conn->local_rx_ctrl.conn_state_flags.peer_conn_abort) {
89+
if (smc_cdc_rxed_any_close(conn)) {
9090
rc = -ECONNRESET;
9191
break;
9292
}
@@ -107,7 +107,7 @@ static int smc_tx_wait_memory(struct smc_sock *smc, int flags)
107107
sk_wait_event(sk, &timeo,
108108
sk->sk_err ||
109109
(sk->sk_shutdown & SEND_SHUTDOWN) ||
110-
smc_cdc_rxed_any_close_or_senddone(conn) ||
110+
smc_cdc_rxed_any_close(conn) ||
111111
atomic_read(&conn->sndbuf_space),
112112
&wait);
113113
}

0 commit comments

Comments
 (0)