From 06e9790bfe47415e134796f38cc22e075c0fbb12 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Tue, 6 Nov 2007 11:33:53 -0800 Subject: [PATCH] cpu alloc: blktrace conversion Signed-off-by: Christoph Lameter --- block/blktrace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: linux-2.6/block/blktrace.c =================================================================== --- linux-2.6.orig/block/blktrace.c 2008-05-14 19:40:32.000000000 -0700 +++ linux-2.6/block/blktrace.c 2008-05-21 21:46:04.000000000 -0700 @@ -154,7 +154,7 @@ t = relay_reserve(bt->rchan, sizeof(*t) + pdu_len); if (t) { cpu = smp_processor_id(); - sequence = per_cpu_ptr(bt->sequence, cpu); + sequence = CPU_PTR(bt->sequence, cpu); t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION; t->sequence = ++(*sequence); @@ -231,7 +231,7 @@ relay_close(bt->rchan); debugfs_remove(bt->dropped_file); blk_remove_tree(bt->dir); - free_percpu(bt->sequence); + CPU_FREE(bt->sequence); kfree(bt); } @@ -342,7 +342,7 @@ if (!bt) goto err; - bt->sequence = alloc_percpu(unsigned long); + bt->sequence = CPU_ALLOC(unsigned long, GFP_KERNEL | __GFP_ZERO); if (!bt->sequence) goto err; @@ -391,7 +391,7 @@ if (bt) { if (bt->dropped_file) debugfs_remove(bt->dropped_file); - free_percpu(bt->sequence); + CPU_FREE(bt->sequence); if (bt->rchan) relay_close(bt->rchan); kfree(bt);