aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-05-21 23:25:50 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-06-21 16:05:30 -0400
commitc051b21f71d1ffdfd7ad406a1ef5ede5e5f974c5 (patch)
tree8ea9859d832e072ec2a8a4123ce46d67aec66f89 /kernel/futex.c
parent1ca7b86062ec8473d03c5cdfd336abc8b1c8098c (diff)
rtmutex: Confine deadlock logic to futex
The deadlock logic is only required for futexes. Remove the extra arguments for the public functions and also for the futex specific ones which get always called with deadlock detection enabled. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index b632b5f3f094..e5c6c404be1d 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1718,7 +1718,7 @@ retry_private:
1718 this->pi_state = pi_state; 1718 this->pi_state = pi_state;
1719 ret = rt_mutex_start_proxy_lock(&pi_state->pi_mutex, 1719 ret = rt_mutex_start_proxy_lock(&pi_state->pi_mutex,
1720 this->rt_waiter, 1720 this->rt_waiter,
1721 this->task, 1); 1721 this->task);
1722 if (ret == 1) { 1722 if (ret == 1) {
1723 /* We got the lock. */ 1723 /* We got the lock. */
1724 requeue_pi_wake_futex(this, &key2, hb2); 1724 requeue_pi_wake_futex(this, &key2, hb2);
@@ -2337,9 +2337,9 @@ retry_private:
2337 /* 2337 /*
2338 * Block on the PI mutex: 2338 * Block on the PI mutex:
2339 */ 2339 */
2340 if (!trylock) 2340 if (!trylock) {
2341 ret = rt_mutex_timed_lock(&q.pi_state->pi_mutex, to, 1); 2341 ret = rt_mutex_timed_futex_lock(&q.pi_state->pi_mutex, to);
2342 else { 2342 } else {
2343 ret = rt_mutex_trylock(&q.pi_state->pi_mutex); 2343 ret = rt_mutex_trylock(&q.pi_state->pi_mutex);
2344 /* Fixup the trylock return value: */ 2344 /* Fixup the trylock return value: */
2345 ret = ret ? 0 : -EWOULDBLOCK; 2345 ret = ret ? 0 : -EWOULDBLOCK;
@@ -2669,7 +2669,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
2669 */ 2669 */
2670 WARN_ON(!q.pi_state); 2670 WARN_ON(!q.pi_state);
2671 pi_mutex = &q.pi_state->pi_mutex; 2671 pi_mutex = &q.pi_state->pi_mutex;
2672 ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter, 1); 2672 ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter);
2673 debug_rt_mutex_free_waiter(&rt_waiter); 2673 debug_rt_mutex_free_waiter(&rt_waiter);
2674 2674
2675 spin_lock(q.lock_ptr); 2675 spin_lock(q.lock_ptr);