diff options
author | Akinbou Mita <akinobu.mita@gmail.com> | 2006-10-12 04:52:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-10-12 04:52:05 -0400 |
commit | 30bdbe397bf58131a91fd836f60972442bed0544 (patch) | |
tree | 1fc3de556974d83789d360c6bc9f46db6e793a31 /net/sched/sch_htb.c | |
parent | b974179abef7cd680b80bd7c7042802bdd6f0eb6 (diff) |
[PKT_SCHED] sch_htb: use rb_first() cleanup
Use rb_first() to get first entry in rb tree.
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index bb3ddd4784b1..9b9c555c713f 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -786,11 +786,10 @@ static long htb_do_events(struct htb_sched *q, int level) | |||
786 | for (i = 0; i < 500; i++) { | 786 | for (i = 0; i < 500; i++) { |
787 | struct htb_class *cl; | 787 | struct htb_class *cl; |
788 | long diff; | 788 | long diff; |
789 | struct rb_node *p = q->wait_pq[level].rb_node; | 789 | struct rb_node *p = rb_first(&q->wait_pq[level]); |
790 | |||
790 | if (!p) | 791 | if (!p) |
791 | return 0; | 792 | return 0; |
792 | while (p->rb_left) | ||
793 | p = p->rb_left; | ||
794 | 793 | ||
795 | cl = rb_entry(p, struct htb_class, pq_node); | 794 | cl = rb_entry(p, struct htb_class, pq_node); |
796 | if (time_after(cl->pq_key, q->jiffies)) { | 795 | if (time_after(cl->pq_key, q->jiffies)) { |