aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 66a888a9ad6f..eb403b40e120 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -44,6 +44,8 @@
44#include "xfs_quota.h" 44#include "xfs_quota.h"
45#include "xfs_fsops.h" 45#include "xfs_fsops.h"
46#include "xfs_utils.h" 46#include "xfs_utils.h"
47#include "xfs_trace.h"
48
47 49
48STATIC void xfs_unmountfs_wait(xfs_mount_t *); 50STATIC void xfs_unmountfs_wait(xfs_mount_t *);
49 51
@@ -2389,12 +2391,12 @@ xfs_icsb_modify_counters(
2389{ 2391{
2390 xfs_icsb_cnts_t *icsbp; 2392 xfs_icsb_cnts_t *icsbp;
2391 long long lcounter; /* long counter for 64 bit fields */ 2393 long long lcounter; /* long counter for 64 bit fields */
2392 int cpu, ret = 0; 2394 int ret = 0;
2393 2395
2394 might_sleep(); 2396 might_sleep();
2395again: 2397again:
2396 cpu = get_cpu(); 2398 preempt_disable();
2397 icsbp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, cpu); 2399 icsbp = this_cpu_ptr(mp->m_sb_cnts);
2398 2400
2399 /* 2401 /*
2400 * if the counter is disabled, go to slow path 2402 * if the counter is disabled, go to slow path
@@ -2438,11 +2440,11 @@ again:
2438 break; 2440 break;
2439 } 2441 }
2440 xfs_icsb_unlock_cntr(icsbp); 2442 xfs_icsb_unlock_cntr(icsbp);
2441 put_cpu(); 2443 preempt_enable();
2442 return 0; 2444 return 0;
2443 2445
2444slow_path: 2446slow_path:
2445 put_cpu(); 2447 preempt_enable();
2446 2448
2447 /* 2449 /*
2448 * serialise with a mutex so we don't burn lots of cpu on 2450 * serialise with a mutex so we don't burn lots of cpu on
@@ -2490,7 +2492,7 @@ slow_path:
2490 2492
2491balance_counter: 2493balance_counter:
2492 xfs_icsb_unlock_cntr(icsbp); 2494 xfs_icsb_unlock_cntr(icsbp);
2493 put_cpu(); 2495 preempt_enable();
2494 2496
2495 /* 2497 /*
2496 * We may have multiple threads here if multiple per-cpu 2498 * We may have multiple threads here if multiple per-cpu