aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gfp.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-11 16:43:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:04:51 -0500
commit819a692804a8d2d42b7bb033d2650dba47622149 (patch)
treea3b614679c0ee42bec418c933d96e194884031d1 /include/linux/gfp.h
parent1584b89c921acefe88881f08d836d80f00600a84 (diff)
[PATCH] x86_64: Handle unknown node (-1) in alloc_pages_node
Following kmalloc_node. Needed for another patch to return -1 for unknown nodes in x86-64. Cc: Christoph Lameter <clameter@engr.sgi.com> Cc: kiran@scalex86.org Signed-off-by: Andi Kleen <ak@suse.de> [ Changed 0 to numa_node_id() on suggestion by Christoph Lameter ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r--include/linux/gfp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index da7ce8730e97..20f9148e38d9 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -110,6 +110,10 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
110 if (unlikely(order >= MAX_ORDER)) 110 if (unlikely(order >= MAX_ORDER))
111 return NULL; 111 return NULL;
112 112
113 /* Unknown node is current node */
114 if (nid < 0)
115 nid = numa_node_id();
116
113 return __alloc_pages(gfp_mask, order, 117 return __alloc_pages(gfp_mask, order,
114 NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask)); 118 NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask));
115} 119}