Commit a90099d9 authored by David S. Miller's avatar David S. Miller

Revert "rhashtable: Use __vmalloc with GFP_ATOMIC for table allocation"

This reverts commit d3716f18.

vmalloc cannot be used in BH disabled contexts, even
with GFP_ATOMIC.  And we certainly want to support
rhashtable users inserting entries with software
interrupts disabled.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e6569af
...@@ -120,9 +120,8 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht, ...@@ -120,9 +120,8 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht,
if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) || if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) ||
gfp != GFP_KERNEL) gfp != GFP_KERNEL)
tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY); tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY);
if (tbl == NULL) if (tbl == NULL && gfp == GFP_KERNEL)
tbl = __vmalloc(size, gfp | __GFP_HIGHMEM | __GFP_ZERO, tbl = vzalloc(size);
PAGE_KERNEL);
if (tbl == NULL) if (tbl == NULL)
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment