patch-2.4.6 linux/net/sched/sch_red.c

Next file: linux/net/socket.c
Previous file: linux/net/sched/sch_gred.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/net/sched/sch_red.c linux/net/sched/sch_red.c
@@ -363,10 +363,8 @@
 static void red_reset(struct Qdisc* sch)
 {
 	struct red_sched_data *q = (struct red_sched_data *)sch->data;
-	struct sk_buff *skb;
 
-	while((skb=__skb_dequeue(&sch->q))!=NULL)
-		kfree_skb(skb);
+	__skb_queue_purge(&sch->q);
 	sch->stats.backlog = 0;
 	PSCHED_SET_PASTPERFECT(q->qidlestart);
 	q->qave = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)