aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJohn Stultz <jstultz@google.com>2024-12-05 15:59:35 -0800
committerPeter Zijlstra <peterz@infradead.org>2024-12-10 15:07:06 +0100
commit7675361ff9a1d9038025c05267600d0c762c0236 (patch)
tree173ef72f63bc3afd6090b3c0a45e0d35ce74f9e8
parentrseq: Validate read-only fields under DEBUG_RSEQ config (diff)
downloadwireguard-linux-7675361ff9a1d9038025c05267600d0c762c0236.tar.xz
wireguard-linux-7675361ff9a1d9038025c05267600d0c762c0236.zip
sched: deadline: Cleanup goto label in pick_earliest_pushable_dl_task
Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()") added a goto label seems would be better written as a while loop. So replace the goto with a while loop, to make it easier to read. Reported-by: Todd Kjos <tkjos@google.com> Signed-off-by: John Stultz <jstultz@google.com> Reviewed-and-tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Juri Lelli <juri.lelli@redhat.com> Link: https://lore.kernel.org/r/20241206000009.1226085-1-jstultz@google.com
Diffstat (limited to '')
-rw-r--r--kernel/sched/deadline.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 33b4646f8b24..643d101cb96a 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2516,16 +2516,13 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
return NULL;
next_node = rb_first_cached(&rq->dl.pushable_dl_tasks_root);
-
-next_node:
- if (next_node) {
+ while (next_node) {
p = __node_2_pdl(next_node);
if (task_is_pushable(rq, p, cpu))
return p;
next_node = rb_next(next_node);
- goto next_node;
}
return NULL;