]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched/deadline: Use task_on_rq_migrating() helper
authorLiang Luo <luoliang@kylinos.cn>
Mon, 8 Jun 2026 07:55:00 +0000 (15:55 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 9 Jun 2026 08:28:08 +0000 (10:28 +0200)
Replace the open-coded "p->on_rq == TASK_ON_RQ_MIGRATING" comparisons
in enqueue_task_dl() and dequeue_task_dl() with the existing
task_on_rq_migrating() helper, consistent with the rest of the
scheduler code.

No functional change.

Signed-off-by: Liang Luo <luoliang@kylinos.cn>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20260608075500.387271-1-luoliang@kylinos.cn
kernel/sched/deadline.c

index 4754dbe4232d30d28606460cae3c03fd3fb4314b..5ccb06effea0591a0875f67e3602951610fc3d9c 100644 (file)
@@ -2530,7 +2530,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
        check_schedstat_required();
        update_stats_wait_start_dl(dl_rq, dl_se);
 
-       if (p->on_rq == TASK_ON_RQ_MIGRATING)
+       if (task_on_rq_migrating(p))
                flags |= ENQUEUE_MIGRATING;
 
        enqueue_dl_entity(dl_se, flags);
@@ -2552,7 +2552,7 @@ static bool dequeue_task_dl(struct rq *rq, struct task_struct *p, int flags)
 {
        update_curr_dl(rq);
 
-       if (p->on_rq == TASK_ON_RQ_MIGRATING)
+       if (task_on_rq_migrating(p))
                flags |= DEQUEUE_MIGRATING;
 
        dequeue_dl_entity(&p->dl, flags);