Skip to content

Commit

Permalink
Revert "rhashtable: Use __vmalloc with GFP_ATOMIC for table allocation"
Browse files Browse the repository at this point in the history
This reverts commit d3716f1.

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: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Dec 6, 2015
1 parent 8e6569a commit a90099d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rhashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a90099d

Please sign in to comment.