Skip to content

Commit

Permalink
[NET_SCHED]: Fix qdisc_restart return value when dequeue is empty
Browse files Browse the repository at this point in the history
My previous patch that changed the return value of qdisc_restart
incorrectly made the case where dequeue returns empty continue
processing packets.

This patch is based on diagnosis and fix by Patrick McHardy.

Reported-and-debugged-by: Anant Nitya <kernel@prachanda.info>

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed May 24, 2007
1 parent d333fc8 commit 36247f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ static inline int qdisc_restart(struct net_device *dev)
else
q->ops->requeue(skb, q);
netif_schedule(dev);
return 0;
}
return 0;

out:
BUG_ON((int) q->q.qlen < 0);
Expand Down

0 comments on commit 36247f5

Please sign in to comment.