[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 Jul 2015 11:12:24 -0400 (EDT)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Mike Snitzer <msnitzer@...hat.com>
cc: "Alasdair G. Kergon" <agk@...hat.com>,
Edward Thornber <thornber@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Vivek Goyal <vgoyal@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, dm-devel@...hat.com
Subject: [PATCH 6/7] dm-stats: use kvmalloc_node
Use kvmalloc_node just to clean up the code and remove duplicated logic.
Signed-off-by: Mikulas Patocka <mpatocka@...hat.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists