X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=lib%2Fgenalloc.c;fp=lib%2Fgenalloc.c;h=f365d71cdc774c089cfdce89b1aec1facb3a0b05;hb=298a61e2c5946191a05df9eaa997e141a8a25fe1;hp=5deb25c40a5a144fd4d85dc93522fe5f307cc934;hpb=a1a27629d91af5a74250c08a23e79a2923cfd073;p=mirror_ubuntu-bionic-kernel.git diff --git a/lib/genalloc.c b/lib/genalloc.c index 5deb25c40a5a..f365d71cdc77 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -187,7 +187,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy int nbytes = sizeof(struct gen_pool_chunk) + BITS_TO_LONGS(nbits) * sizeof(long); - chunk = kzalloc_node(nbytes, GFP_KERNEL, nid); + chunk = vzalloc_node(nbytes, nid); if (unlikely(chunk == NULL)) return -ENOMEM; @@ -251,7 +251,7 @@ void gen_pool_destroy(struct gen_pool *pool) bit = find_next_bit(chunk->bits, end_bit, 0); BUG_ON(bit < end_bit); - kfree(chunk); + vfree(chunk); } kfree_const(pool->name); kfree(pool);