aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-06-08 09:26:46 +0200
committerIngo Molnar <mingo@kernel.org>2016-06-08 09:26:46 +0200
commit616d1c1b98ac79f30216a57a170dd7cea19b3df3 (patch)
tree6f244c2e5a7160190e73bc82b4cd7fa7bb22ee31 /lib/rhashtable.c
parentperf/core: Fix crash due to account/unaccount_sb_event() inconsistency (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
downloadlinux-dev-616d1c1b98ac79f30216a57a170dd7cea19b3df3.tar.xz
linux-dev-616d1c1b98ac79f30216a57a170dd7cea19b3df3.zip
Merge branch 'linus' into perf/core, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index cc808707d1cf..5d845ffd7982 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -487,6 +487,7 @@ EXPORT_SYMBOL_GPL(rhashtable_insert_slow);
* rhashtable_walk_init - Initialise an iterator
* @ht: Table to walk over
* @iter: Hash table Iterator
+ * @gfp: GFP flags for allocations
*
* This function prepares a hash table walk.
*
@@ -504,14 +505,15 @@ EXPORT_SYMBOL_GPL(rhashtable_insert_slow);
* You must call rhashtable_walk_exit if this function returns
* successfully.
*/
-int rhashtable_walk_init(struct rhashtable *ht, struct rhashtable_iter *iter)
+int rhashtable_walk_init(struct rhashtable *ht, struct rhashtable_iter *iter,
+ gfp_t gfp)
{
iter->ht = ht;
iter->p = NULL;
iter->slot = 0;
iter->skip = 0;
- iter->walker = kmalloc(sizeof(*iter->walker), GFP_KERNEL);
+ iter->walker = kmalloc(sizeof(*iter->walker), gfp);
if (!iter->walker)
return -ENOMEM;