]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - lib/rhashtable.c
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[karo-tx-linux.git] / lib / rhashtable.c
index a1eb7c947f4670deb67135f8dcdb9353f5991212..707ca5d677c676a599442604d918c215d7709138 100644 (file)
@@ -211,11 +211,10 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht,
        int i;
 
        size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]);
-       if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) ||
-           gfp != GFP_KERNEL)
+       if (gfp != GFP_KERNEL)
                tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY);
-       if (tbl == NULL && gfp == GFP_KERNEL)
-               tbl = vzalloc(size);
+       else
+               tbl = kvzalloc(size, gfp);
 
        size = nbuckets;