mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
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:
parent
97f86c38ab
commit
d757ac2ee7
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user