Skip to content

Commit

Permalink
padata: use __this_cpu_read per-cpu helper
Browse files Browse the repository at this point in the history
For bottom halves off, __this_cpu_read is better.

Signed-off-by: Shan Wei <[email protected]>
Reviewed-by: Christoph Lameter <[email protected]>
Acked-by: Steffen Klassert <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
shanwei authored and herbertx committed Dec 6, 2012
1 parent a465348 commit f0fcf20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/padata.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd)
{
int cpu, num_cpus;
unsigned int next_nr, next_index;
struct padata_parallel_queue *queue, *next_queue;
struct padata_parallel_queue *next_queue;
struct padata_priv *padata;
struct padata_list *reorder;

Expand Down Expand Up @@ -204,8 +204,7 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd)
goto out;
}

queue = per_cpu_ptr(pd->pqueue, smp_processor_id());
if (queue->cpu_index == next_queue->cpu_index) {
if (__this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index) {
padata = ERR_PTR(-ENODATA);
goto out;
}
Expand Down

0 comments on commit f0fcf20

Please sign in to comment.