[NET_SCHED]: sch_cbq: fix cbq_undelay_prio for non-active priorites
authorPatrick McHardy <kaber@trash.net>
Fri, 16 Mar 2007 08:21:40 +0000 (01:21 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:11 +0000 (22:26 -0700)
cbq_undelay_prio is supposed to return a time delta, but returns the
current time for non-active priorities, causing cbq_undelay to mark
the priority as active and schedule a timer for twice the current
time.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_cbq.c

index d29d1212934d9ce2170b5bd879893c30327866cd..32f6a308bad6d7840187b45ac871cb785adf852b 100644 (file)
@@ -612,7 +612,7 @@ static unsigned long cbq_undelay_prio(struct cbq_sched_data *q, int prio)
        unsigned long sched = now;
 
        if (cl_prev == NULL)
-               return now;
+               return 0;
 
        do {
                cl = cl_prev->next_alive;