提交 30bdbe39 编写于 作者: A Akinbou Mita 提交者: David S. Miller

[PKT_SCHED] sch_htb: use rb_first() cleanup

Use rb_first() to get first entry in rb tree.
Signed-off-by: NAkinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b974179a
...@@ -786,11 +786,10 @@ static long htb_do_events(struct htb_sched *q, int level) ...@@ -786,11 +786,10 @@ static long htb_do_events(struct htb_sched *q, int level)
for (i = 0; i < 500; i++) { for (i = 0; i < 500; i++) {
struct htb_class *cl; struct htb_class *cl;
long diff; long diff;
struct rb_node *p = q->wait_pq[level].rb_node; struct rb_node *p = rb_first(&q->wait_pq[level]);
if (!p) if (!p)
return 0; return 0;
while (p->rb_left)
p = p->rb_left;
cl = rb_entry(p, struct htb_class, pq_node); cl = rb_entry(p, struct htb_class, pq_node);
if (time_after(cl->pq_key, q->jiffies)) { if (time_after(cl->pq_key, q->jiffies)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册