diff options
-rw-r--r-- | include/linux/gfp.h | 4 |
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 | } |