diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2018-05-15 17:05:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-16 11:49:20 -0400 |
commit | 3cf52eb11fa00b8dc8a773893fd808e3a09b3961 (patch) | |
tree | 4a1e1bfbdc9ceb3e5830fdc8564bc84f919f40a3 /net/smc/smc_core.c | |
parent | 1401ea045b96ae1112bf384e6f03f909643f04be (diff) | |
download | linux-3cf52eb11fa00b8dc8a773893fd808e3a09b3961.tar.gz linux-3cf52eb11fa00b8dc8a773893fd808e3a09b3961.tar.bz2 linux-3cf52eb11fa00b8dc8a773893fd808e3a09b3961.zip |
net/smc: set link inactive before calling smc_lgr_free()
Before smc_lgr_free() is called the link must be set inactive by calling
smc_llc_link_inactive().
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
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 4523bbad8a15..a48ee00b65ff 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -148,8 +148,11 @@ static void smc_lgr_free_work(struct work_struct *work) list_del_init(&lgr->list); /* remove from smc_lgr_list */ free: spin_unlock_bh(&smc_lgr_list.lock); - if (!delayed_work_pending(&lgr->free_work)) + if (!delayed_work_pending(&lgr->free_work)) { + if (lgr->lnk[SMC_SINGLE_LINK].state != SMC_LNK_INACTIVE) + smc_llc_link_inactive(&lgr->lnk[SMC_SINGLE_LINK]); smc_lgr_free(lgr); + } } /* create a new SMC link group */ |