OSDN Git Service

Merge tag 'v4.20-rc5' into sched/core, to pick up fixes
[uclinux-h8/linux.git] / kernel / sched / core.c
index 6fedf3a..8050f26 100644 (file)
@@ -697,7 +697,7 @@ static void set_load_weight(struct task_struct *p, bool update_load)
        /*
         * SCHED_IDLE tasks get minimal weight:
         */
-       if (idle_policy(p->policy)) {
+       if (task_has_idle_policy(p)) {
                load->weight = scale_load(WEIGHT_IDLEPRIO);
                load->inv_weight = WMULT_IDLEPRIO;
                p->se.runnable_weight = load->weight;
@@ -4191,7 +4191,7 @@ recheck:
                 * Treat SCHED_IDLE as nice 20. Only allow a switch to
                 * SCHED_NORMAL if the RLIMIT_NICE would normally permit it.
                 */
-               if (idle_policy(p->policy) && !idle_policy(policy)) {
+               if (task_has_idle_policy(p) && !idle_policy(policy)) {
                        if (!can_nice(p, task_nice(p)))
                                return -EPERM;
                }