From 6fb2f0b2b4122da92669ce679e1bda405032cb63 Mon Sep 17 00:00:00 2001 From: Daniel Hodges Date: Sun, 22 Sep 2024 02:49:43 -0400 Subject: [PATCH] scx_layered: Clean up waker code Signed-off-by: Daniel Hodges --- scheds/rust/scx_layered/src/bpf/main.bpf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scheds/rust/scx_layered/src/bpf/main.bpf.c b/scheds/rust/scx_layered/src/bpf/main.bpf.c index 8fa9acd..4223c60 100644 --- a/scheds/rust/scx_layered/src/bpf/main.bpf.c +++ b/scheds/rust/scx_layered/src/bpf/main.bpf.c @@ -1334,10 +1334,8 @@ void on_wakeup(struct task_struct *p, struct task_ctx *tctx) struct task_ctx *waker_tctx; struct task_struct *waker; - if (!(cctx = lookup_cpu_ctx(-1))) - return; - - if (!(layer = lookup_layer(tctx->layer))) + if (!(cctx = lookup_cpu_ctx(-1)) || + !(layer = lookup_layer(tctx->layer))) return; if (!(waker = bpf_get_current_task_btf()) ||