|
@@ -885,10 +885,13 @@ static void __remove_hrtimer(struct hrtimer *timer,
|
|
|
struct hrtimer_clock_base *base,
|
|
|
unsigned long newstate, int reprogram)
|
|
|
{
|
|
|
+ struct timerqueue_node *next_timer;
|
|
|
if (!(timer->state & HRTIMER_STATE_ENQUEUED))
|
|
|
goto out;
|
|
|
|
|
|
- if (&timer->node == timerqueue_getnext(&base->active)) {
|
|
|
+ next_timer = timerqueue_getnext(&base->active);
|
|
|
+ timerqueue_del(&base->active, &timer->node);
|
|
|
+ if (&timer->node == next_timer) {
|
|
|
#ifdef CONFIG_HIGH_RES_TIMERS
|
|
|
/* Reprogram the clock event device. if enabled */
|
|
|
if (reprogram && hrtimer_hres_active()) {
|
|
@@ -901,7 +904,6 @@ static void __remove_hrtimer(struct hrtimer *timer,
|
|
|
}
|
|
|
#endif
|
|
|
}
|
|
|
- timerqueue_del(&base->active, &timer->node);
|
|
|
if (!timerqueue_getnext(&base->active))
|
|
|
base->cpu_base->active_bases &= ~(1 << base->index);
|
|
|
out:
|