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, { struct sched_attr attr = { .sched_policy = policy, - .sched_priority = param->sched_priority + .sched_priority = param->sched_priority, + .sched_nice = PRIO_TO_NICE(p->static_prio), }; return __sched_setscheduler(p, &attr, true); } @@ -3481,7 +3482,8 @@ int sched_setscheduler_nocheck(struct task_struct *p, int policy, { struct sched_attr attr = { .sched_policy = policy, - .sched_priority = param->sched_priority + .sched_priority = param->sched_priority, + .sched_nice = PRIO_TO_NICE(p->static_prio), }; return __sched_setscheduler(p, &attr, false); } |