mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
net/smc: enable fallback for connection abort in state INIT
If a linkgroup is terminated abnormally already due to failing LLC CONFIRM LINK or LLC ADD LINK, fallback to TCP is still possible. In this case do not switch to state SMC_PEERABORTWAIT and do not set sk_err. Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1ca52fcfac
commit
dd65d87a6a
|
@ -100,15 +100,14 @@ static void smc_close_active_abort(struct smc_sock *smc)
|
|||
struct smc_cdc_conn_state_flags *txflags =
|
||||
&smc->conn.local_tx_ctrl.conn_state_flags;
|
||||
|
||||
sk->sk_err = ECONNABORTED;
|
||||
if (smc->clcsock && smc->clcsock->sk) {
|
||||
smc->clcsock->sk->sk_err = ECONNABORTED;
|
||||
smc->clcsock->sk->sk_state_change(smc->clcsock->sk);
|
||||
if (sk->sk_state != SMC_INIT && smc->clcsock && smc->clcsock->sk) {
|
||||
sk->sk_err = ECONNABORTED;
|
||||
if (smc->clcsock && smc->clcsock->sk) {
|
||||
smc->clcsock->sk->sk_err = ECONNABORTED;
|
||||
smc->clcsock->sk->sk_state_change(smc->clcsock->sk);
|
||||
}
|
||||
}
|
||||
switch (sk->sk_state) {
|
||||
case SMC_INIT:
|
||||
sk->sk_state = SMC_PEERABORTWAIT;
|
||||
break;
|
||||
case SMC_ACTIVE:
|
||||
sk->sk_state = SMC_PEERABORTWAIT;
|
||||
release_sock(sk);
|
||||
|
@ -143,6 +142,7 @@ static void smc_close_active_abort(struct smc_sock *smc)
|
|||
case SMC_PEERFINCLOSEWAIT:
|
||||
sock_put(sk); /* passive closing */
|
||||
break;
|
||||
case SMC_INIT:
|
||||
case SMC_PEERABORTWAIT:
|
||||
case SMC_CLOSED:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue