rtmutex: Clean up

Previous patches changed the meaning of the return value of
rt_mutex_slowunlock(); update comments and code to reflect this.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: juri.lelli@arm.com
Cc: bigeasy@linutronix.de
Cc: xlpang@redhat.com
Cc: rostedt@goodmis.org
Cc: mathieu.desnoyers@efficios.com
Cc: jdesfossez@efficios.com
Cc: bristot@redhat.com
Link: http://lkml.kernel.org/r/20170323150216.255058238@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Peter Zijlstra 2017-03-23 15:56:10 +01:00 committed by Thomas Gleixner
parent 85e2d4f992
commit aa2bfe5536
3 changed files with 18 additions and 19 deletions

View file

@ -1394,7 +1394,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
{
u32 uninitialized_var(curval), newval;
struct task_struct *new_owner;
bool deboost = false;
bool postunlock = false;
DEFINE_WAKE_Q(wake_q);
int ret = 0;
@ -1455,12 +1455,13 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
/*
* We've updated the uservalue, this unlock cannot fail.
*/
deboost = __rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q);
postunlock = __rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q);
out_unlock:
raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
rt_mutex_postunlock(&wake_q, deboost);
if (postunlock)
rt_mutex_postunlock(&wake_q);
return ret;
}