diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2019-10-31 08:42:55 +0100 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2019-11-03 08:30:58 +0100 |
commit | 9044854e4b8b2cf60fc309a1f2288f7acda6ca6b (patch) | |
tree | d50c69ec7188961f9ded0644fec719ad3ce1d8db /net/batman-adv | |
parent | 79f0a4858fa700c0b77795a2f5795be3f9b27017 (diff) |
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@wanadoo.fr>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bat_v_ogm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c index 8033f24f506c..76b732e2f31c 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; } |