alloc_percpu: Use get_cpu_ptr in fs/nfs

Impact: slight efficiency improvement on some archs.

Let's use get_cpu_ptr_ptr now, rather than per_cpu_ptr(..., smp_processor_id()).

Note that now we have real dynamic per-cpu allocations, cacheline aligning
should not win anything, and is a little antisocial.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
---
 fs/nfs/iostat.h |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/iostat.h b/fs/nfs/iostat.h
--- a/fs/nfs/iostat.h
+++ b/fs/nfs/iostat.h
@@ -17,16 +17,14 @@ struct nfs_iostats {
 struct nfs_iostats {
 	unsigned long long	bytes[__NFSIOS_BYTESMAX];
 	unsigned long		events[__NFSIOS_COUNTSMAX];
-} ____cacheline_aligned;
+};
 
 static inline void nfs_inc_server_stats(const struct nfs_server *server,
 					enum nfs_stat_eventcounters stat)
 {
 	struct nfs_iostats *iostats;
-	int cpu;
 
-	cpu = get_cpu();
-	iostats = per_cpu_ptr(server->io_stats, cpu);
+	iostats = get_cpu_ptr(server->io_stats);
 	iostats->events[stat]++;
 	put_cpu_no_resched();
 }
@@ -42,10 +40,8 @@ static inline void nfs_add_server_stats(
 					unsigned long addend)
 {
 	struct nfs_iostats *iostats;
-	int cpu;
 
-	cpu = get_cpu();
-	iostats = per_cpu_ptr(server->io_stats, cpu);
+	iostats = get_cpu_ptr(server->io_stats);
 	iostats->bytes[stat] += addend;
 	put_cpu_no_resched();
 }
