提交 9044854e 编写于 作者: C Christophe JAILLET 提交者: Simon Wunderlich

batman-adv: Simplify 'batadv_v_ogm_aggr_list_free()'

Use 'skb_queue_purge()' instead of re-implementing it.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NSven Eckelmann <sven@narfation.org>
Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
上级 79f0a485
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册