2013-08-30 01:22:23

by Jianguo Wu

[permalink] [raw]
Subject: [PATCH 1/4] mm/vmalloc: use NUMA_NO_NODE

Use more appropriate "if (node == NUMA_NO_NODE)" instead of "if (node < 0)"

Signed-off-by: Jianguo Wu <[email protected]>
---
mm/vmalloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 13a5495..f5483f8 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1582,7 +1582,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
struct page *page;
gfp_t tmp_mask = gfp_mask | __GFP_NOWARN;

- if (node < 0)
+ if (node == NUMA_NO_NODE)
page = alloc_page(tmp_mask);
else
page = alloc_pages_node(node, tmp_mask, order);
--
1.7.1


2013-08-30 21:48:32

by David Rientjes

[permalink] [raw]
Subject: Re: [PATCH 1/4] mm/vmalloc: use NUMA_NO_NODE

On Fri, 30 Aug 2013, Jianguo Wu wrote:

> Use more appropriate "if (node == NUMA_NO_NODE)" instead of "if (node < 0)"
>
> Signed-off-by: Jianguo Wu <[email protected]>

Acked-by: David Rientjes <[email protected]>