diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2020-04-29 18:10:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-29 22:26:32 +0300 |
commit | 2140ac26f8f501d3cc8f1575e6419f1a50779496 (patch) | |
tree | b19a2b0e88fbf64e9b1345ee5168295db59ab9c9 /net/smc/smc_llc.c | |
parent | 1020e1ef53ceef715f2bc144eebbfe01e88effcf (diff) | |
download | linux-2140ac26f8f501d3cc8f1575e6419f1a50779496.tar.xz |
net/smc: simplify link deactivation
Cancel the testlink worker during link clear processing and remove the
extra function smc_llc_link_inactive().
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_llc.c')
-rw-r--r-- | net/smc/smc_llc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index 69cc0d65b437..2f03131c85fd 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -660,22 +660,15 @@ void smc_llc_link_deleting(struct smc_link *link) smc_wr_wakeup_tx_wait(link); } -/* called in tasklet context */ -void smc_llc_link_inactive(struct smc_link *link) -{ - if (link->state == SMC_LNK_INACTIVE) - return; - link->state = SMC_LNK_INACTIVE; - cancel_delayed_work_sync(&link->llc_testlink_wrk); - smc_wr_wakeup_reg_wait(link); - smc_wr_wakeup_tx_wait(link); -} - /* called in worker context */ void smc_llc_link_clear(struct smc_link *link) { flush_workqueue(link->llc_wq); destroy_workqueue(link->llc_wq); + complete(&link->llc_testlink_resp); + cancel_delayed_work_sync(&link->llc_testlink_wrk); + smc_wr_wakeup_reg_wait(link); + smc_wr_wakeup_tx_wait(link); } /* register a new rtoken at the remote peer */ |