]> err.no Git - linux-2.6/commitdiff
mm: fix broken gfp_zone with __GFP_THISNODE
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Mon, 28 Apr 2008 09:13:36 +0000 (02:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:26 +0000 (08:58 -0700)
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>
include/linux/gfp.h

index 898aa9d5b6c20502c8d4244dc61b386338e15334..c37653b6843fb81bdd60f4e07fd54ec3d9e8c3f3 100644 (file)
@@ -119,29 +119,22 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags)
 
 static inline enum zone_type gfp_zone(gfp_t flags)
 {
-       int base = 0;
-
-#ifdef CONFIG_NUMA
-       if (flags & __GFP_THISNODE)
-               base = MAX_NR_ZONES;
-#endif
-
 #ifdef CONFIG_ZONE_DMA
        if (flags & __GFP_DMA)
-               return base + ZONE_DMA;
+               return ZONE_DMA;
 #endif
 #ifdef CONFIG_ZONE_DMA32
        if (flags & __GFP_DMA32)
-               return base + ZONE_DMA32;
+               return ZONE_DMA32;
 #endif
        if ((flags & (__GFP_HIGHMEM | __GFP_MOVABLE)) ==
                        (__GFP_HIGHMEM | __GFP_MOVABLE))
-               return base + ZONE_MOVABLE;
+               return ZONE_MOVABLE;
 #ifdef CONFIG_HIGHMEM
        if (flags & __GFP_HIGHMEM)
-               return base + ZONE_HIGHMEM;
+               return ZONE_HIGHMEM;
 #endif
-       return base + ZONE_NORMAL;
+       return ZONE_NORMAL;
 }
 
 /*