diff options
Diffstat (limited to 'net/sched/sch_fifo.c')
-rw-r--r-- | net/sched/sch_fifo.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index f7290d2542c2..be33f9ddf9dd 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c | |||
@@ -45,17 +45,14 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
45 | 45 | ||
46 | static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) | 46 | static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) |
47 | { | 47 | { |
48 | struct sk_buff *skb_head; | ||
49 | struct fifo_sched_data *q = qdisc_priv(sch); | 48 | struct fifo_sched_data *q = qdisc_priv(sch); |
50 | 49 | ||
51 | if (likely(skb_queue_len(&sch->q) < q->limit)) | 50 | if (likely(skb_queue_len(&sch->q) < q->limit)) |
52 | return qdisc_enqueue_tail(skb, sch); | 51 | return qdisc_enqueue_tail(skb, sch); |
53 | 52 | ||
54 | /* queue full, remove one skb to fulfill the limit */ | 53 | /* queue full, remove one skb to fulfill the limit */ |
55 | skb_head = qdisc_dequeue_head(sch); | 54 | __qdisc_queue_drop_head(sch, &sch->q); |
56 | sch->qstats.drops++; | 55 | sch->qstats.drops++; |
57 | kfree_skb(skb_head); | ||
58 | |||
59 | qdisc_enqueue_tail(skb, sch); | 56 | qdisc_enqueue_tail(skb, sch); |
60 | 57 | ||
61 | return NET_XMIT_CN; | 58 | return NET_XMIT_CN; |