Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932410AbbGGPMs (ORCPT ); Tue, 7 Jul 2015 11:12:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32967 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757715AbbGGPMZ (ORCPT ); Tue, 7 Jul 2015 11:12:25 -0400 Date: Tue, 7 Jul 2015 11:12:24 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Mike Snitzer cc: "Alasdair G. Kergon" , Edward Thornber , Andrew Morton , David Rientjes , Vivek Goyal , linux-kernel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com Subject: [PATCH 6/7] dm-stats: use kvmalloc_node In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 32 Use kvmalloc_node just to clean up the code and remove duplicated logic. Signed-off-by: Mikulas Patocka --- 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/