diff options
author | Tejun Heo <tj@kernel.org> | 2014-09-07 20:51:30 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-09-07 20:51:30 -0400 |
commit | 20ae00792c6f1f18fc4fc5965445a145df92827e (patch) | |
tree | 3ca91fac24ac0a672c105e766c4d5020e53be876 /include/linux/proportions.h | |
parent | 908c7f1949cb7cc6e92ba8f18f2998e87e265b8e (diff) |
proportions: add @gfp to init functions
Percpu allocator now supports allocation mask. Add @gfp to
[flex_]proportions init functions so that !GFP_KERNEL allocation masks
can be used with them too.
This patch doesn't make any functional difference.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include/linux/proportions.h')
-rw-r--r-- | include/linux/proportions.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/proportions.h b/include/linux/proportions.h index 26a8a4ed9b07..00e8e8fa7358 100644 --- a/include/linux/proportions.h +++ b/include/linux/proportions.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/percpu_counter.h> | 12 | #include <linux/percpu_counter.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/gfp.h> | ||
15 | 16 | ||
16 | struct prop_global { | 17 | struct prop_global { |
17 | /* | 18 | /* |
@@ -40,7 +41,7 @@ struct prop_descriptor { | |||
40 | struct mutex mutex; /* serialize the prop_global switch */ | 41 | struct mutex mutex; /* serialize the prop_global switch */ |
41 | }; | 42 | }; |
42 | 43 | ||
43 | int prop_descriptor_init(struct prop_descriptor *pd, int shift); | 44 | int prop_descriptor_init(struct prop_descriptor *pd, int shift, gfp_t gfp); |
44 | void prop_change_shift(struct prop_descriptor *pd, int new_shift); | 45 | void prop_change_shift(struct prop_descriptor *pd, int new_shift); |
45 | 46 | ||
46 | /* | 47 | /* |
@@ -61,7 +62,7 @@ struct prop_local_percpu { | |||
61 | raw_spinlock_t lock; /* protect the snapshot state */ | 62 | raw_spinlock_t lock; /* protect the snapshot state */ |
62 | }; | 63 | }; |
63 | 64 | ||
64 | int prop_local_init_percpu(struct prop_local_percpu *pl); | 65 | int prop_local_init_percpu(struct prop_local_percpu *pl, gfp_t gfp); |
65 | void prop_local_destroy_percpu(struct prop_local_percpu *pl); | 66 | void prop_local_destroy_percpu(struct prop_local_percpu *pl); |
66 | void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl); | 67 | void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl); |
67 | void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl, | 68 | void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl, |