[PATCH 06/11] smp: Remove preempt_disable from smp_call_function

Chuyi Zhou posted 11 patches 6 days, 8 hours ago
[PATCH 06/11] smp: Remove preempt_disable from smp_call_function
Posted by Chuyi Zhou 6 days, 8 hours ago
Now smp_call_function_many_cond() internally handles the preemption logic,
so smp_call_function() does not need to explicitly disable preemption.
Remove preempt_{enable, disable} from smp_call_function().

Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
---
 kernel/smp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index af9cee7d4939..088b581003fb 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -977,9 +977,8 @@ EXPORT_SYMBOL(smp_call_function_many);
  */
 void smp_call_function(smp_call_func_t func, void *info, int wait)
 {
-	preempt_disable();
-	smp_call_function_many(cpu_online_mask, func, info, wait);
-	preempt_enable();
+	smp_call_function_many_cond(cpu_online_mask, func, info,
+			wait ? SCF_WAIT : 0, NULL);
 }
 EXPORT_SYMBOL(smp_call_function);
 
-- 
2.20.1