[NET_SCHED]: sch_cbq: fix watchdog scheduled too late
authorPatrick McHardy <kaber@trash.net>
Fri, 16 Mar 2007 19:31:28 +0000 (12:31 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:16 +0000 (22:26 -0700)
q->now is increased during dequeue and doesn't contain the current time
afterwards, resulting in a too large timeout value for the qdisc watchdog.
Use "now" instead, which still contains 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 0491fad..d83414d 100644 (file)
@@ -1070,7 +1070,7 @@ cbq_dequeue(struct Qdisc *sch)
                sch->qstats.overlimits++;
                if (q->wd_expires)
                        qdisc_watchdog_schedule(&q->watchdog,
-                                               q->now + q->wd_expires);
+                                               now + q->wd_expires);
        }
        return NULL;
 }