diff options
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 8b2eab90abb6..20f9148e38d9 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -57,6 +57,7 @@ struct vm_area_struct; | |||
57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ | 57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ |
58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) | 58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) |
59 | 59 | ||
60 | /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ | ||
60 | #define GFP_ATOMIC (__GFP_HIGH) | 61 | #define GFP_ATOMIC (__GFP_HIGH) |
61 | #define GFP_NOIO (__GFP_WAIT) | 62 | #define GFP_NOIO (__GFP_WAIT) |
62 | #define GFP_NOFS (__GFP_WAIT | __GFP_IO) | 63 | #define GFP_NOFS (__GFP_WAIT | __GFP_IO) |
@@ -109,6 +110,10 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, | |||
109 | if (unlikely(order >= MAX_ORDER)) | 110 | if (unlikely(order >= MAX_ORDER)) |
110 | return NULL; | 111 | return NULL; |
111 | 112 | ||
113 | /* Unknown node is current node */ | ||
114 | if (nid < 0) | ||
115 | nid = numa_node_id(); | ||
116 | |||
112 | return __alloc_pages(gfp_mask, order, | 117 | return __alloc_pages(gfp_mask, order, |
113 | NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask)); | 118 | NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask)); |
114 | } | 119 | } |