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

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

net/smc: check connections in smc_lgr_free_work



Remove the shortcut that smc_lgr_free() would skip the check for
existing connections when the link group is not in the link group list.

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 cf0cfe53
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -160,8 +160,6 @@ static void smc_lgr_free_work(struct work_struct *work)
	bool conns;

	spin_lock_bh(&smc_lgr_list.lock);
	if (list_empty(&lgr->list))
		goto free;
	read_lock_bh(&lgr->conns_lock);
	conns = RB_EMPTY_ROOT(&lgr->conns_all);
	read_unlock_bh(&lgr->conns_lock);
@@ -169,8 +167,8 @@ static void smc_lgr_free_work(struct work_struct *work)
		spin_unlock_bh(&smc_lgr_list.lock);
		return;
	}
	if (!list_empty(&lgr->list))
		list_del_init(&lgr->list); /* remove from smc_lgr_list */
free:
	spin_unlock_bh(&smc_lgr_list.lock);

	if (!lgr->is_smcd && !lgr->terminating)	{