diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2008-04-28 05:13:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:26 -0400 |
commit | 8cece85ec744bdc7ea0fc2d33f65b3f031c28468 (patch) | |
tree | f11f84a37cf53f4db78d12b6372b7fe105ddccf5 /include/linux/gfp.h | |
parent | 2309f9e6fe3f1de661eab9613f7903ab4420c753 (diff) |
mm: fix broken gfp_zone with __GFP_THISNODE
This hack, "base = MAX_NR_ZONES", at __GFP_THISNODE was used for old
zonliests.
Now, new zonelist[] have a list for __GFP_THISNODE and this hack is incorrect.
Should be removed.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 | /* |