Skip to content

Commit

Permalink
this_cpu: Use this_cpu_ptr in crypto subsystem
Browse files Browse the repository at this point in the history
Just a slight optimization that removes one array lookup.
The processor number is needed for other things as well so the
get/put_cpu cannot be removed.

Acked-by: Tejun Heo <[email protected]>
Cc: Huang Ying <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
Christoph Lameter authored and htejun committed Oct 3, 2009
1 parent 7a9e02d commit 0b44f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue,
struct cryptd_cpu_queue *cpu_queue;

cpu = get_cpu();
cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu);
cpu_queue = this_cpu_ptr(queue->cpu_queue);
err = crypto_enqueue_request(&cpu_queue->queue, request);
queue_work_on(cpu, kcrypto_wq, &cpu_queue->work);
put_cpu();
Expand Down

0 comments on commit 0b44f48

Please sign in to comment.