Skip to content

Commit

Permalink
batman-adv: Simplify 'batadv_v_ogm_aggr_list_free()'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe JAILLET authored and Simon Wunderlich committed Nov 3, 2019
1 parent 79f0a48 commit 9044854
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/batman-adv/bat_v_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9044854

Please sign in to comment.