summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rhashtable.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 1c624db90e88..2ff7ed91663a 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -120,9 +120,8 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht,
 	if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) ||
 	    gfp != GFP_KERNEL)
 		tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY);
-	if (tbl == NULL)
-		tbl = __vmalloc(size, gfp | __GFP_HIGHMEM | __GFP_ZERO,
-				PAGE_KERNEL);
+	if (tbl == NULL && gfp == GFP_KERNEL)
+		tbl = vzalloc(size);
 	if (tbl == NULL)
 		return NULL;