diff options
-rw-r--r-- | kernel/sched/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 26af3702ebf1..c1b3d7e04f0f 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -3451,7 +3451,8 @@ int sched_setscheduler(struct task_struct *p, int policy, | |||
3451 | { | 3451 | { |
3452 | struct sched_attr attr = { | 3452 | struct sched_attr attr = { |
3453 | .sched_policy = policy, | 3453 | .sched_policy = policy, |
3454 | .sched_priority = param->sched_priority | 3454 | .sched_priority = param->sched_priority, |
3455 | .sched_nice = PRIO_TO_NICE(p->static_prio), | ||
3455 | }; | 3456 | }; |
3456 | return __sched_setscheduler(p, &attr, true); | 3457 | return __sched_setscheduler(p, &attr, true); |
3457 | } | 3458 | } |
@@ -3481,7 +3482,8 @@ int sched_setscheduler_nocheck(struct task_struct *p, int policy, | |||
3481 | { | 3482 | { |
3482 | struct sched_attr attr = { | 3483 | struct sched_attr attr = { |
3483 | .sched_policy = policy, | 3484 | .sched_policy = policy, |
3484 | .sched_priority = param->sched_priority | 3485 | .sched_priority = param->sched_priority, |
3486 | .sched_nice = PRIO_TO_NICE(p->static_prio), | ||
3485 | }; | 3487 | }; |
3486 | return __sched_setscheduler(p, &attr, false); | 3488 | return __sched_setscheduler(p, &attr, false); |
3487 | } | 3489 | } |