sched_ext: Remove redundant rcu_read_lock/unlock() in sysrq_handle_sched_ext_reset()

sysrq_handle_sched_ext_reset() is called from __handle_sysrq(), which
already holds rcu_read_lock() while invoking the sysrq handler. Remove
the redundant rcu_read_lock/unlock() pair.

Signed-off-by: Zqiang <qiang.zhang@linux.dev>
Reviewed-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Zqiang 2026-04-30 16:45:43 +08:00 committed by Tejun Heo
parent 97f86c38ab
commit d757ac2ee7

View File

@ -7914,13 +7914,11 @@ static void sysrq_handle_sched_ext_reset(u8 key)
{
struct scx_sched *sch;
rcu_read_lock();
sch = rcu_dereference(scx_root);
if (likely(sch))
scx_disable(sch, SCX_EXIT_SYSRQ);
else
pr_info("sched_ext: BPF schedulers not loaded\n");
rcu_read_unlock();
}
static const struct sysrq_key_op sysrq_sched_ext_reset_op = {