Skip to content

Commit

Permalink
hrtimer: Replace usages of hrtimer_callback_running with relaxed version
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiLux committed Aug 25, 2015
1 parent 6b0e9d4 commit 74f1642
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
* completed. There is no conflict as we hold the lock until
* the timer is enqueued.
*/
if (unlikely(hrtimer_callback_running(timer)))
if (unlikely(hrtimer_callback_running_relaxed(timer)))
return base;

/* See the comment in lock_timer_base() */
Expand Down Expand Up @@ -632,7 +632,7 @@ static int hrtimer_reprogram(struct hrtimer *timer,
* reprogramming is handled either by the softirq, which called the
* callback or at the end of the hrtimer_interrupt.
*/
if (hrtimer_callback_running(timer))
if (hrtimer_callback_running_relaxed(timer))
return 0;

/*
Expand Down Expand Up @@ -1106,7 +1106,7 @@ int hrtimer_try_to_cancel(struct hrtimer *timer)

base = lock_hrtimer_base(timer, &flags);

if (!hrtimer_callback_running(timer))
if (!hrtimer_callback_running_relaxed(timer))
ret = remove_hrtimer(timer, base);

unlock_hrtimer_base(timer, &flags);
Expand Down Expand Up @@ -1704,7 +1704,7 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,

while ((node = timerqueue_getnext(&old_base->active))) {
timer = container_of(node, struct hrtimer, node);
BUG_ON(hrtimer_callback_running(timer));
BUG_ON(hrtimer_callback_running_relaxed(timer));
debug_deactivate(timer);

/*
Expand Down
2 changes: 1 addition & 1 deletion kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -2848,7 +2848,7 @@ static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire)
u64 remaining;

/* if the call-back is running a quota refresh is already occurring */
if (hrtimer_callback_running(refresh_timer))
if (hrtimer_callback_running_relaxed(refresh_timer))
return 1;

/* is a quota refresh about to occur? */
Expand Down

0 comments on commit 74f1642

Please sign in to comment.