diff options
Diffstat (limited to 'lib/percpu_counter.c')
-rw-r--r-- | lib/percpu_counter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index 3fde78275cd1..48144cdae819 100644 --- a/lib/percpu_counter.c +++ b/lib/percpu_counter.c | |||
@@ -112,7 +112,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc) | |||
112 | } | 112 | } |
113 | EXPORT_SYMBOL(__percpu_counter_sum); | 113 | EXPORT_SYMBOL(__percpu_counter_sum); |
114 | 114 | ||
115 | int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, | 115 | int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, gfp_t gfp, |
116 | struct lock_class_key *key) | 116 | struct lock_class_key *key) |
117 | { | 117 | { |
118 | unsigned long flags __maybe_unused; | 118 | unsigned long flags __maybe_unused; |
@@ -120,7 +120,7 @@ int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, | |||
120 | raw_spin_lock_init(&fbc->lock); | 120 | raw_spin_lock_init(&fbc->lock); |
121 | lockdep_set_class(&fbc->lock, key); | 121 | lockdep_set_class(&fbc->lock, key); |
122 | fbc->count = amount; | 122 | fbc->count = amount; |
123 | fbc->counters = alloc_percpu(s32); | 123 | fbc->counters = alloc_percpu_gfp(s32, gfp); |
124 | if (!fbc->counters) | 124 | if (!fbc->counters) |
125 | return -ENOMEM; | 125 | return -ENOMEM; |
126 | 126 | ||