From 76440fbc7e0d18b03a5babed39cfe9dfb3947fbd Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Sat, 3 Oct 2009 19:48:23 +0900 Subject: [PATCH] --- yaml --- r: 175895 b: refs/heads/master c: 7a9e02d6bb05b268dc403d7ee87ce4198062f838 h: refs/heads/master i: 175893: 923e9f82cb3658533d23120b0645f63266811247 175891: a161dfb5864f306c93a6ef6e93cd3c591b16529a 175887: 3ba6903b56009b6f4cd0c3fd914a57179ebe5591 v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_mount.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index a5ed7bc55cf1..f9abe2693b8c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7dcaa4755e35d7540bf19f316f8798357c53fa0 +refs/heads/master: 7a9e02d6bb05b268dc403d7ee87ce4198062f838 diff --git a/trunk/fs/xfs/xfs_mount.c b/trunk/fs/xfs/xfs_mount.c index 8b6c9e807efb..ccafe8ef7ad5 100644 --- a/trunk/fs/xfs/xfs_mount.c +++ b/trunk/fs/xfs/xfs_mount.c @@ -2389,12 +2389,12 @@ 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); + preempt_disable(); + icsbp = this_cpu_ptr(mp->m_sb_cnts); /* * if the counter is disabled, go to slow path @@ -2438,11 +2438,11 @@ xfs_icsb_modify_counters( break; } xfs_icsb_unlock_cntr(icsbp); - put_cpu(); + preempt_enable(); return 0; slow_path: - put_cpu(); + preempt_enable(); /* * serialise with a mutex so we don't burn lots of cpu on @@ -2490,7 +2490,7 @@ xfs_icsb_modify_counters( balance_counter: xfs_icsb_unlock_cntr(icsbp); - put_cpu(); + preempt_enable(); /* * We may have multiple threads here if multiple per-cpu