Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24878
b: refs/heads/master
c: a2c348f
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Mar 31, 2006
1 parent 046b259 commit 8f64aa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3691c5199e8a4be1c7a91b5ab925db5feb866e19
refs/heads/master: a2c348fe0117adced11e374329a5ea3f7c43cb41
14 changes: 6 additions & 8 deletions trunk/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,19 @@ int __mod_timer(struct timer_list *timer, unsigned long expires)
* handler yet has not finished. This also guarantees that
* the timer is serialized wrt itself.
*/
if (unlikely(base->running_timer == timer)) {
/* The timer remains on a former base */
new_base = base;
} else {
if (likely(base->running_timer != timer)) {
/* See the comment in lock_timer_base() */
timer->base = NULL;
spin_unlock(&base->lock);
spin_lock(&new_base->lock);
timer->base = new_base;
base = new_base;
spin_lock(&base->lock);
timer->base = base;
}
}

timer->expires = expires;
internal_add_timer(new_base, timer);
spin_unlock_irqrestore(&new_base->lock, flags);
internal_add_timer(base, timer);
spin_unlock_irqrestore(&base->lock, flags);

return ret;
}
Expand Down

0 comments on commit 8f64aa8

Please sign in to comment.