diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index e83d61ca78cab71c7a54c22b7d09cc94611726a8..5da548fa7ae9d46de78f5b75152e1a84b99ca9a7 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -501,9 +501,8 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch) /* if more time remaining? */ if (cb->time_to_send <= psched_get_time()) { - skb = qdisc_dequeue_tail(sch); - if (unlikely(!skb)) - goto qdisc_dequeue; + __skb_unlink(skb, &sch->q); + sch->qstats.backlog -= qdisc_pkt_len(skb); #ifdef CONFIG_NET_CLS_ACT /* @@ -539,7 +538,6 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch) qdisc_watchdog_schedule(&q->watchdog, cb->time_to_send); } -qdisc_dequeue: if (q->qdisc) { skb = q->qdisc->ops->dequeue(q->qdisc); if (skb)