alloc_percpu: Use __get_cpu_ptr in fs/xfs

Impact: slight efficiency improvement on some archs.

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

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tim Shimmin <xfs-masters@oss.sgi.com>
Cc: xfs@oss.sgi.com
---
 fs/xfs/xfs_mount.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -2317,12 +2317,11 @@ xfs_icsb_modify_counters(
 {
 	xfs_icsb_cnts_t	*icsbp;
 	long long	lcounter;	/* long counter for 64 bit fields */
-	int		cpu, ret = 0;
+	int		ret = 0;
 
 	might_sleep();
 again:
-	cpu = get_cpu();
-	icsbp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, cpu);
+	icsbp = (xfs_icsb_cnts_t *)get_cpu_ptr(mp->m_sb_cnts);
 
 	/*
 	 * if the counter is disabled, go to slow path
@@ -2370,7 +2369,7 @@ again:
 	return 0;
 
 slow_path:
-	put_cpu();
+	put_cpu_ptr();
 
 	/*
 	 * serialise with a mutex so we don't burn lots of cpu on
@@ -2418,7 +2417,7 @@ slow_path:
 
 balance_counter:
 	xfs_icsb_unlock_cntr(icsbp);
-	put_cpu();
+	put_cpu_ptr(mp->m_sb_cnts);
 
 	/*
 	 * We may have multiple threads here if multiple per-cpu
