diff options
-rw-r--r-- | kernel/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 0c638cf3d9d2..c0d8898fed98 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -404,9 +404,9 @@ static void internal_add_timer(struct tvec_base *base, struct timer_list *timer) | |||
404 | * Update base->active_timers and base->next_timer | 404 | * Update base->active_timers and base->next_timer |
405 | */ | 405 | */ |
406 | if (!tbase_get_deferrable(timer->base)) { | 406 | if (!tbase_get_deferrable(timer->base)) { |
407 | if (time_before(timer->expires, base->next_timer)) | 407 | if (!base->active_timers++ || |
408 | time_before(timer->expires, base->next_timer)) | ||
408 | base->next_timer = timer->expires; | 409 | base->next_timer = timer->expires; |
409 | base->active_timers++; | ||
410 | } | 410 | } |
411 | base->all_timers++; | 411 | base->all_timers++; |
412 | } | 412 | } |