diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2019-10-21 16:13:14 +0200 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-22 11:23:44 -0700 |
commit | f528ba24a8ad61b8a5e55d34cb1da127ce67cf6e (patch) | |
tree | 2a6f73a0ab76e77f76f2ea0a46ae1e87bbe8e24a /net/smc/smc_core.c | |
parent | 2a0674fffb6bc1a7c0f46bb2e0b1bcf1d49c2232 (diff) | |
download | linux-f528ba24a8ad61b8a5e55d34cb1da127ce67cf6e.tar.bz2 |
net/smc: introduce link group termination worker
Use a worker for link group termination to guarantee process context.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'net/smc/smc_core.c')
-rw-r--r-- | net/smc/smc_core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 6faaa38412b1..46d4b944c4c4 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -219,6 +219,14 @@ static void smc_lgr_free_work(struct work_struct *work) smc_lgr_free(lgr); } +static void smc_lgr_terminate_work(struct work_struct *work) +{ + struct smc_link_group *lgr = container_of(work, struct smc_link_group, + terminate_work); + + smc_lgr_terminate(lgr); +} + /* create a new SMC link group */ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini) { @@ -258,6 +266,7 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini) smc_lgr_list.num += SMC_LGR_NUM_INCR; memcpy(&lgr->id, (u8 *)&smc_lgr_list.num, SMC_LGR_ID_SIZE); INIT_DELAYED_WORK(&lgr->free_work, smc_lgr_free_work); + INIT_WORK(&lgr->terminate_work, smc_lgr_terminate_work); lgr->conns_all = RB_ROOT; if (ini->is_smcd) { /* SMC-D specific settings */ |