diff options
Diffstat (limited to 'lib/percpu_counter.c')
| -rw-r--r-- | lib/percpu_counter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index 48144cdae819..f051d69f0910 100644 --- a/lib/percpu_counter.c +++ b/lib/percpu_counter.c | |||
| @@ -197,13 +197,13 @@ static int percpu_counter_hotcpu_callback(struct notifier_block *nb, | |||
| 197 | * Compare counter against given value. | 197 | * Compare counter against given value. |
| 198 | * Return 1 if greater, 0 if equal and -1 if less | 198 | * Return 1 if greater, 0 if equal and -1 if less |
| 199 | */ | 199 | */ |
| 200 | int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs) | 200 | int __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch) |
| 201 | { | 201 | { |
| 202 | s64 count; | 202 | s64 count; |
| 203 | 203 | ||
| 204 | count = percpu_counter_read(fbc); | 204 | count = percpu_counter_read(fbc); |
| 205 | /* Check to see if rough count will be sufficient for comparison */ | 205 | /* Check to see if rough count will be sufficient for comparison */ |
| 206 | if (abs(count - rhs) > (percpu_counter_batch*num_online_cpus())) { | 206 | if (abs(count - rhs) > (batch * num_online_cpus())) { |
| 207 | if (count > rhs) | 207 | if (count > rhs) |
| 208 | return 1; | 208 | return 1; |
| 209 | else | 209 | else |
| @@ -218,7 +218,7 @@ int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs) | |||
| 218 | else | 218 | else |
| 219 | return 0; | 219 | return 0; |
| 220 | } | 220 | } |
| 221 | EXPORT_SYMBOL(percpu_counter_compare); | 221 | EXPORT_SYMBOL(__percpu_counter_compare); |
| 222 | 222 | ||
| 223 | static int __init percpu_counter_startup(void) | 223 | static int __init percpu_counter_startup(void) |
| 224 | { | 224 | { |
