Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

padata: use __this_cpu_read per-cpu helper

For bottom halves off, __this_cpu_read is better.

Signed-off-by: Shan Wei <davidshan@tencent.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Shan Wei and committed by
Herbert Xu
f0fcf200 a465348f

+2 -3
+2 -3
kernel/padata.c
··· 171 171 { 172 172 int cpu, num_cpus; 173 173 unsigned int next_nr, next_index; 174 - struct padata_parallel_queue *queue, *next_queue; 174 + struct padata_parallel_queue *next_queue; 175 175 struct padata_priv *padata; 176 176 struct padata_list *reorder; 177 177 ··· 204 204 goto out; 205 205 } 206 206 207 - queue = per_cpu_ptr(pd->pqueue, smp_processor_id()); 208 - if (queue->cpu_index == next_queue->cpu_index) { 207 + if (__this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index) { 209 208 padata = ERR_PTR(-ENODATA); 210 209 goto out; 211 210 }