diff options
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 898aa9d5b6c2..c37653b6843f 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -119,29 +119,22 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
119 | 119 | ||
120 | static inline enum zone_type gfp_zone(gfp_t flags) | 120 | static inline enum zone_type gfp_zone(gfp_t flags) |
121 | { | 121 | { |
122 | int base = 0; | ||
123 | |||
124 | #ifdef CONFIG_NUMA | ||
125 | if (flags & __GFP_THISNODE) | ||
126 | base = MAX_NR_ZONES; | ||
127 | #endif | ||
128 | |||
129 | #ifdef CONFIG_ZONE_DMA | 122 | #ifdef CONFIG_ZONE_DMA |
130 | if (flags & __GFP_DMA) | 123 | if (flags & __GFP_DMA) |
131 | return base + ZONE_DMA; | 124 | return ZONE_DMA; |
132 | #endif | 125 | #endif |
133 | #ifdef CONFIG_ZONE_DMA32 | 126 | #ifdef CONFIG_ZONE_DMA32 |
134 | if (flags & __GFP_DMA32) | 127 | if (flags & __GFP_DMA32) |
135 | return base + ZONE_DMA32; | 128 | return ZONE_DMA32; |
136 | #endif | 129 | #endif |
137 | if ((flags & (__GFP_HIGHMEM | __GFP_MOVABLE)) == | 130 | if ((flags & (__GFP_HIGHMEM | __GFP_MOVABLE)) == |
138 | (__GFP_HIGHMEM | __GFP_MOVABLE)) | 131 | (__GFP_HIGHMEM | __GFP_MOVABLE)) |
139 | return base + ZONE_MOVABLE; | 132 | return ZONE_MOVABLE; |
140 | #ifdef CONFIG_HIGHMEM | 133 | #ifdef CONFIG_HIGHMEM |
141 | if (flags & __GFP_HIGHMEM) | 134 | if (flags & __GFP_HIGHMEM) |
142 | return base + ZONE_HIGHMEM; | 135 | return ZONE_HIGHMEM; |
143 | #endif | 136 | #endif |
144 | return base + ZONE_NORMAL; | 137 | return ZONE_NORMAL; |
145 | } | 138 | } |
146 | 139 | ||
147 | /* | 140 | /* |