hrtimer: convert net::sched_cbq to the new hrtimer apis
authorArjan van de Ven <arjan@linux.intel.com>
Mon, 1 Sep 2008 22:00:54 +0000 (15:00 -0700)
committerArjan van de Ven <arjan@linux.intel.com>
Sat, 6 Sep 2008 04:35:11 +0000 (21:35 -0700)
In order to be able to do range hrtimers we need to use accessor functions
to the "expire" member of the hrtimer struct.
This patch converts sched_cbq to these accessors.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

net/sched/sch_cbq.c

index 8b06fa9..03e389e 100644 (file)
@@ -545,9 +545,10 @@ static void cbq_ovl_delay(struct cbq_class *cl)
                        expires = ktime_set(0, 0);
                        expires = ktime_add_ns(expires, PSCHED_US2NS(sched));
                        if (hrtimer_try_to_cancel(&q->delay_timer) &&
-                           ktime_to_ns(ktime_sub(q->delay_timer.expires,
-                                                 expires)) > 0)
-                               q->delay_timer.expires = expires;
+                           ktime_to_ns(ktime_sub(
+                                       hrtimer_get_expires(&q->delay_timer),
+                                       expires)) > 0)
+                               hrtimer_set_expires(&q->delay_timer, expires);
                        hrtimer_restart(&q->delay_timer);
                        cl->delayed = 1;
                        cl->xstats.overactions++;