Use kvmalloc_node just to clean up the code and remove duplicated logic. Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> --- drivers/md/dm-stats.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) Index: linux-4.1/drivers/md/dm-stats.c =================================================================== --- linux-4.1.orig/drivers/md/dm-stats.c 2015-07-02 19:21:39.000000000 +0200 +++ linux-4.1/drivers/md/dm-stats.c 2015-07-02 19:23:00.000000000 +0200 @@ -146,12 +146,7 @@ static void *dm_stats_kvzalloc(size_t al if (!claim_shared_memory(alloc_size)) return NULL; - if (alloc_size <= KMALLOC_MAX_SIZE) { - p = kzalloc_node(alloc_size, GFP_KERNEL | __GFP_NORETRY | __GFP_NOMEMALLOC | __GFP_NOWARN, node); - if (p) - return p; - } - p = vzalloc_node(alloc_size, node); + p = kvmalloc_node(alloc_size, GFP_KERNEL | __GFP_ZERO, node); if (p) return p; -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel