diff --git a/lib/rhashtable.c b/lib/rhashtable.c index ae4223e0f5bcb68610511b2cb7ba2e12b7f7d086..238c8daa985249431be3271411232edcf9a58cf1 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -174,10 +174,7 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht, int i; size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]); - if (gfp != GFP_KERNEL) - tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY); - else - tbl = kvzalloc(size, gfp); + tbl = kvzalloc(size, gfp); size = nbuckets; @@ -450,7 +447,7 @@ static int rhashtable_insert_rehash(struct rhashtable *ht, err = -ENOMEM; - new_tbl = bucket_table_alloc(ht, size, GFP_ATOMIC); + new_tbl = bucket_table_alloc(ht, size, GFP_ATOMIC | __GFP_NOWARN); if (new_tbl == NULL) goto fail;