Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
---------------------------------------------------------------
commit af0f704023e11cf45106664cdbdfeeb869859497
Author: Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
Date: Thu Oct 31 08:42:55 2019 +0100
batman-adv: Simplify 'batadv_v_ogm_aggr_list_free()'
Use 'skb_queue_purge()' instead of re-implementing it.
Signed-off-by: Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---------------------------------------------------------------
af0f704023e11cf45106664cdbdfeeb869859497
net/batman-adv/bat_v_ogm.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 8033f24f..76b732e2 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -178,13 +178,9 @@ static bool batadv_v_ogm_queue_left(struct sk_buff *skb,
*/
static void batadv_v_ogm_aggr_list_free(struct batadv_hard_iface *hard_iface)
{
- struct sk_buff *skb;
-
lockdep_assert_held(&hard_iface->bat_v.aggr_list_lock);
- while ((skb = skb_dequeue(&hard_iface->bat_v.aggr_list)))
- kfree_skb(skb);
-
+ skb_queue_purge(&hard_iface->bat_v.aggr_list);
hard_iface->bat_v.aggr_len = 0;
}