summaryrefslogtreecommitdiff
path: root/include/linux/proportions.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-08 04:51:30 +0400
committerTejun Heo <tj@kernel.org>2014-09-08 04:51:30 +0400
commit20ae00792c6f1f18fc4fc5965445a145df92827e (patch)
tree3ca91fac24ac0a672c105e766c4d5020e53be876 /include/linux/proportions.h
parent908c7f1949cb7cc6e92ba8f18f2998e87e265b8e (diff)
downloadlinux-20ae00792c6f1f18fc4fc5965445a145df92827e.tar.xz
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.h5
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 @@
#include <linux/percpu_counter.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
+#include <linux/gfp.h>
struct prop_global {
/*
@@ -40,7 +41,7 @@ struct prop_descriptor {
struct mutex mutex; /* serialize the prop_global switch */
};
-int prop_descriptor_init(struct prop_descriptor *pd, int shift);
+int prop_descriptor_init(struct prop_descriptor *pd, int shift, gfp_t gfp);
void prop_change_shift(struct prop_descriptor *pd, int new_shift);
/*
@@ -61,7 +62,7 @@ struct prop_local_percpu {
raw_spinlock_t lock; /* protect the snapshot state */
};
-int prop_local_init_percpu(struct prop_local_percpu *pl);
+int prop_local_init_percpu(struct prop_local_percpu *pl, gfp_t gfp);
void prop_local_destroy_percpu(struct prop_local_percpu *pl);
void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl);
void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl,