Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e4b3b0e8734d1173c96c6f5d8a8dd6728950b56
Commit:     2e4b3b0e8734d1173c96c6f5d8a8dd6728950b56
Parent:     1b07a95a5be77dc1291de12b216f930aee04eb4f
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 23:39:54 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu May 24 16:36:56 2007 -0700

    [NET_SCHED]: sch_htb: fix event cache time calculation
    
    The event cache time must be an absolute value, when no event exists
    it is incorrectly set to 1s instead of 1s in the future.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sched/sch_htb.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 99bcec8..035788c 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -976,8 +976,9 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
 
                if (q->now >= q->near_ev_cache[level]) {
                        event = htb_do_events(q, level);
-                       q->near_ev_cache[level] = event ? event :
-                                                         PSCHED_TICKS_PER_SEC;
+                       if (!event)
+                               event = q->now + PSCHED_TICKS_PER_SEC;
+                       q->near_ev_cache[level] = event;
                } else
                        event = q->near_ev_cache[level];
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to