* [PATCH] sch_htb: use rb_first() cleanup
@ 2006-10-12 5:30 Akinobu Mita
2006-10-12 8:52 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2006-10-12 5:30 UTC (permalink / raw)
To: linux-kernel; +Cc: David S. Miller
Use rb_first() to get first entry in rb tree.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
net/sched/sch_htb.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: work-fault-inject/net/sched/sch_htb.c
===================================================================
--- work-fault-inject.orig/net/sched/sch_htb.c
+++ work-fault-inject/net/sched/sch_htb.c
@@ -786,11 +786,10 @@ static long htb_do_events(struct htb_sch
for (i = 0; i < 500; i++) {
struct htb_class *cl;
long diff;
- struct rb_node *p = q->wait_pq[level].rb_node;
+ struct rb_node *p = rb_first(&q->wait_pq[level]);
+
if (!p)
return 0;
- while (p->rb_left)
- p = p->rb_left;
cl = rb_entry(p, struct htb_class, pq_node);
if (time_after(cl->pq_key, q->jiffies)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-12 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12 5:30 [PATCH] sch_htb: use rb_first() cleanup Akinobu Mita
2006-10-12 8:52 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox