Skip to content

Commit

Permalink
net/smc: avoid possible duplicate dmb unregistration
Browse files Browse the repository at this point in the history
smc_lgr_cleanup() calls smcd_unregister_all_dmbs() as part of the link
group termination process. This is a leftover from the times when
smc_lgr_cleanup() scheduled a worker to actually free the link group.
Nowadays smc_lgr_cleanup() directly calls smc_lgr_free() without any
delay so an earlier dmb unregistration is no longer needed.
So remove smcd_unregister_all_dmbs() and the call to it.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Karsten Graul authored and David S. Miller committed Jun 3, 2021
1 parent c356be0 commit f8e0a68
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions net/smc/smc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,20 +1235,6 @@ static void smc_lgr_free(struct smc_link_group *lgr)
kfree(lgr);
}

static void smcd_unregister_all_dmbs(struct smc_link_group *lgr)
{
int i;

for (i = 0; i < SMC_RMBE_SIZES; i++) {
struct smc_buf_desc *buf_desc;

list_for_each_entry(buf_desc, &lgr->rmbs[i], list) {
buf_desc->len += sizeof(struct smcd_cdc_msg);
smc_ism_unregister_dmb(lgr->smcd, buf_desc);
}
}
}

static void smc_sk_wake_ups(struct smc_sock *smc)
{
smc->sk.sk_write_space(&smc->sk);
Expand Down Expand Up @@ -1285,7 +1271,6 @@ static void smc_lgr_cleanup(struct smc_link_group *lgr)
{
if (lgr->is_smcd) {
smc_ism_signal_shutdown(lgr);
smcd_unregister_all_dmbs(lgr);
} else {
u32 rsn = lgr->llc_termination_rsn;

Expand Down

0 comments on commit f8e0a68

Please sign in to comment.