[NET_SCHED]: Fix qdisc_restart return value when dequeue is empty
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 May 2007 21:30:44 +0000 (14:30 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 24 May 2007 23:36:43 +0000 (16:36 -0700)
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>
net/sched/sch_generic.c

index f28bb2dc58d0af3f17c7430eafe9d110ec6cba31..cbefe225581e0b203d68b087653e81f18972dcd8 100644 (file)
@@ -169,8 +169,8 @@ requeue:
                else
                        q->ops->requeue(skb, q);
                netif_schedule(dev);
-               return 0;
        }
+       return 0;
 
 out:
        BUG_ON((int) q->q.qlen < 0);