[PATCH v9 08/14] smp: Remove preempt_disable() from on_each_cpu_cond_mask()
From: Chuyi Zhou
Date: Tue Jun 30 2026 - 07:22:47 EST
smp_call_function_many_cond() handles the preemption and CPU pinning
requirements internally. on_each_cpu_cond_mask() only builds the call
flags and forwards the request to that helper.
Remove the outer preempt_disable() and preempt_enable() pair from
on_each_cpu_cond_mask().
Signed-off-by: Chuyi Zhou <zhouchuyi@xxxxxxxxxxxxx>
Tested-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
Reviewed-by: Muchun Song <muchun.song@xxxxxxxxx>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
kernel/smp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index 933a14dbb8f8..db0a123911d1 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -1131,9 +1131,7 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
if (wait)
scf_flags |= SCF_WAIT;
- preempt_disable();
smp_call_function_many_cond(mask, func, info, scf_flags, cond_func);
- preempt_enable();
}
EXPORT_SYMBOL(on_each_cpu_cond_mask);
--
2.20.1