aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAl Viro <viro@www.linux.org.uk>2005-04-24 15:28:34 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-24 15:28:34 -0400
commit01424961e621737c638e489b6a0b5e6602b02612 (patch)
treeae51380febe42e40d09375648b0d379325b905a7 /mm
parentbc86120a85ebf553180946e8854d1993f074e9f5 (diff)
[PATCH] mempolicy.c GFP fix
zonelist_policy() forgot to mask non-zone bits from gfp when comparing zone number with policy_zone. ACKed-by: Andi Kleen <ak@suse.de> Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index a3b44a671cec..08c41da429cf 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -661,7 +661,7 @@ static struct zonelist *zonelist_policy(unsigned int __nocast gfp, struct mempol
661 case MPOL_BIND: 661 case MPOL_BIND:
662 /* Lower zones don't get a policy applied */ 662 /* Lower zones don't get a policy applied */
663 /* Careful: current->mems_allowed might have moved */ 663 /* Careful: current->mems_allowed might have moved */
664 if (gfp >= policy_zone) 664 if ((gfp & GFP_ZONEMASK) >= policy_zone)
665 if (cpuset_zonelist_valid_mems_allowed(policy->v.zonelist)) 665 if (cpuset_zonelist_valid_mems_allowed(policy->v.zonelist))
666 return policy->v.zonelist; 666 return policy->v.zonelist;
667 /*FALL THROUGH*/ 667 /*FALL THROUGH*/