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>
This commit is contained in:
parent
9ed28556a3
commit
90d8b29cb4
@ -173,8 +173,11 @@ free:
|
|||||||
spin_unlock_bh(&smc_lgr_list.lock);
|
spin_unlock_bh(&smc_lgr_list.lock);
|
||||||
|
|
||||||
if (!lgr->is_smcd && !lgr->terminating) {
|
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 */
|
/* 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 */
|
/* reschedule in case we never receive a response */
|
||||||
smc_lgr_schedule_free_work(lgr);
|
smc_lgr_schedule_free_work(lgr);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user