aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/locking
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-05-19 16:12:32 +0200
committerThomas Gleixner <tglx@linutronix.de>2015-05-19 16:12:32 +0200
commitc3b5d3cea508d2c8ff493ef18c45a9cc58fb7015 (patch)
treea80672ee82fcc3d9c8d486e53731eb19cd968eb0 /kernel/locking
parenttime: Allow gcc to fold constants when possible (diff)
parentLinux 4.1-rc4 (diff)
downloadlinux-dev-c3b5d3cea508d2c8ff493ef18c45a9cc58fb7015.tar.xz
linux-dev-c3b5d3cea508d2c8ff493ef18c45a9cc58fb7015.zip
Merge branch 'linus' into timers/core
Make sure the upstream fixes are applied before adding further modifications.
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/rtmutex.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 8626437acf0c..8b678cac7fbe 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -265,15 +265,17 @@ struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
}
/*
- * Called by sched_setscheduler() to check whether the priority change
- * is overruled by a possible priority boosting.
+ * Called by sched_setscheduler() to get the priority which will be
+ * effective after the change.
*/
-int rt_mutex_check_prio(struct task_struct *task, int newprio)
+int rt_mutex_get_effective_prio(struct task_struct *task, int newprio)
{
if (!task_has_pi_waiters(task))
- return 0;
+ return newprio;
- return task_top_pi_waiter(task)->task->prio <= newprio;
+ if (task_top_pi_waiter(task)->task->prio <= newprio)
+ return task_top_pi_waiter(task)->task->prio;
+ return newprio;
}
/*