Skip to content

Commit

Permalink
rtmutex: Remove bogus hrtimer_active() check
Browse files Browse the repository at this point in the history
The check for hrtimer_active() after starting the timer is
pointless. If the timer is inactive it has expired already and
therefor the task pointer is already NULL.

Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Preeti U Murthy <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Apr 22, 2015
1 parent 2e4b0d3 commit ccdd92c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/locking/rtmutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,11 +1180,8 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
set_current_state(state);

/* Setup the timer, when timeout != NULL */
if (unlikely(timeout)) {
if (unlikely(timeout))
hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS);
if (!hrtimer_active(&timeout->timer))
timeout->task = NULL;
}

ret = task_blocks_on_rt_mutex(lock, &waiter, current, chwalk);

Expand Down

0 comments on commit ccdd92c

Please sign in to comment.