summaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-04-07 11:15:50 -0700
committerGrant Likely <grant.likely@secretlab.ca>2011-04-07 11:15:50 -0700
commit454abcc57f1d48a976291bc4af73b5f087e21d70 (patch)
tree5bba999ea3f31527da02b60604531cc5fb52ea57 /kernel/sched.c
parent88aab9341a315d81118be6b41c45e4fe32b94bc1 (diff)
parent6221f222c0ebf1acdf7abcf927178f40e1a65e2a (diff)
Merge commit 'v2.6.39-rc2' into spi/merge
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index f592ce6f8616..a8845516ace6 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5011,6 +5011,17 @@ recheck:
return -EINVAL;
}
+ /*
+ * If not changing anything there's no need to proceed further:
+ */
+ if (unlikely(policy == p->policy && (!rt_policy(policy) ||
+ param->sched_priority == p->rt_priority))) {
+
+ __task_rq_unlock(rq);
+ raw_spin_unlock_irqrestore(&p->pi_lock, flags);
+ return 0;
+ }
+
#ifdef CONFIG_RT_GROUP_SCHED
if (user) {
/*