]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
padata: Remove cpu online check from cpu add and removal
authorChuyi Zhou <zhouchuyi@bytedance.com>
Thu, 26 Feb 2026 08:07:03 +0000 (16:07 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 7 Mar 2026 05:12:21 +0000 (14:12 +0900)
commit73117ea6470dca787f70f33c001f9faf437a1c0b
treefa21e86e460bdce11ef641161d5bc192b2e00057
parentd2ad1cf29a98adafaf85ddd5ccad6e40c14bcff9
padata: Remove cpu online check from cpu add and removal

During the CPU offline process, the dying CPU is cleared from the
cpu_online_mask in takedown_cpu(). After this step, various CPUHP_*_DEAD
callbacks are executed to perform cleanup jobs for the dead CPU, so this
cpu online check in padata_cpu_dead() is unnecessary.

Similarly, when executing padata_cpu_online() during the
CPUHP_AP_ONLINE_DYN phase, the CPU has already been set in the
cpu_online_mask, the action even occurs earlier than the
CPUHP_AP_ONLINE_IDLE stage.

Remove this unnecessary cpu online check in __padata_add_cpu() and
__padata_remove_cpu().

Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
Acked-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
kernel/padata.c