diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2018-11-22 10:26:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-23 17:20:32 -0800 |
commit | 90d8b29cb4b251cd874aa00a50d11b28a7322986 (patch) | |
tree | 7563db747946b6609962c4a7f5a15e46afb47735 /net/smc/smc_core.c | |
parent | 9ed28556a388fdb894bdf9bd64c05cf6e7783ba3 (diff) | |
download | linux-90d8b29cb4b251cd874aa00a50d11b28a7322986.tar.gz linux-90d8b29cb4b251cd874aa00a50d11b28a7322986.tar.bz2 linux-90d8b29cb4b251cd874aa00a50d11b28a7322986.zip |
net/smc: no link delete for a never active link
If a link is terminated that has never reached the active state,
there is no need to trigger an LLC DELETE LINK.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.c')
-rw-r--r-- | net/smc/smc_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 4812ca30f1dc..ec7a7ed3b968 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -173,8 +173,11 @@ free: spin_unlock_bh(&smc_lgr_list.lock); if (!lgr->is_smcd && !lgr->terminating) { + struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK]; + /* try to send del link msg, on error free lgr immediately */ - if (!smc_link_send_delete(&lgr->lnk[SMC_SINGLE_LINK])) { + if (lnk->state == SMC_LNK_ACTIVE && + !smc_link_send_delete(lnk)) { /* reschedule in case we never receive a response */ smc_lgr_schedule_free_work(lgr); return; |