aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux-foundation.org>2009-10-03 06:48:23 -0400
committerTejun Heo <tj@kernel.org>2009-10-03 06:48:23 -0400
commit7a9e02d6bb05b268dc403d7ee87ce4198062f838 (patch)
treef38920e87e9d908c19e881ccbf549ae4035f9724 /fs/xfs/xfs_mount.c
parente7dcaa4755e35d7540bf19f316f8798357c53fa0 (diff)
this_cpu: xfs_icsb_modify_counters does not need "cpu" variable
The xfs_icsb_modify_counters() function no longer needs the cpu variable if we use this_cpu_ptr() and we can get rid of get/put_cpu(). Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Olaf Weber <olaf@sgi.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 8b6c9e807efb..ccafe8ef7ad5 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -2389,12 +2389,12 @@ xfs_icsb_modify_counters(
2389{ 2389{
2390 xfs_icsb_cnts_t *icsbp; 2390 xfs_icsb_cnts_t *icsbp;
2391 long long lcounter; /* long counter for 64 bit fields */ 2391 long long lcounter; /* long counter for 64 bit fields */
2392 int cpu, ret = 0; 2392 int ret = 0;
2393 2393
2394 might_sleep(); 2394 might_sleep();
2395again: 2395again:
2396 cpu = get_cpu(); 2396 preempt_disable();
2397 icsbp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, cpu); 2397 icsbp = this_cpu_ptr(mp->m_sb_cnts);
2398 2398
2399 /* 2399 /*
2400 * if the counter is disabled, go to slow path 2400 * if the counter is disabled, go to slow path
@@ -2438,11 +2438,11 @@ again:
2438 break; 2438 break;
2439 } 2439 }
2440 xfs_icsb_unlock_cntr(icsbp); 2440 xfs_icsb_unlock_cntr(icsbp);
2441 put_cpu(); 2441 preempt_enable();
2442 return 0; 2442 return 0;
2443 2443
2444slow_path: 2444slow_path:
2445 put_cpu(); 2445 preempt_enable();
2446 2446
2447 /* 2447 /*
2448 * serialise with a mutex so we don't burn lots of cpu on 2448 * serialise with a mutex so we don't burn lots of cpu on
@@ -2490,7 +2490,7 @@ slow_path:
2490 2490
2491balance_counter: 2491balance_counter:
2492 xfs_icsb_unlock_cntr(icsbp); 2492 xfs_icsb_unlock_cntr(icsbp);
2493 put_cpu(); 2493 preempt_enable();
2494 2494
2495 /* 2495 /*
2496 * We may have multiple threads here if multiple per-cpu 2496 * We may have multiple threads here if multiple per-cpu