Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cf52eb1 authored by Karsten Graul's avatar Karsten Graul Committed by David S. Miller
Browse files

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: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1401ea04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1644,6 +1644,7 @@ static void __exit smc_exit(void)
	spin_unlock_bh(&smc_lgr_list.lock);
	list_for_each_entry_safe(lgr, lg, &lgr_freeing_list, list) {
		list_del_init(&lgr->list);
		smc_llc_link_inactive(&lgr->lnk[SMC_SINGLE_LINK]);
		cancel_delayed_work_sync(&lgr->free_work);
		smc_lgr_free(lgr); /* free link group */
	}
+4 −1
Original line number Diff line number Diff line
@@ -148,9 +148,12 @@ 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 */
static int smc_lgr_create(struct smc_sock *smc,