From: Bob Liu Date: Mon, 24 May 2010 21:32:00 +0000 (-0700) Subject: mempolicy: remove case MPOL_INTERLEAVE from policy_zonelist() X-Git-Tag: v3.12-rc1~10204 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6eb27e1fdf5781719a3d2e90e6c89fa012135c62;p=kernel%2Fkernel-generic.git mempolicy: remove case MPOL_INTERLEAVE from policy_zonelist() In policy_zonelist() mode MPOL_INTERLEAVE shouldn't happen, so fall through to BUG() instead of break to return. I also fixed the comment. Signed-off-by: Bob Liu Acked-by: David Rientjes Cc: Andi Kleen Cc: Lee Schermerhorn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mempolicy.c b/mm/mempolicy.c index ad500f3..d97355b 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1441,15 +1441,13 @@ static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy) /* * Normally, MPOL_BIND allocations are node-local within the * allowed nodemask. However, if __GFP_THISNODE is set and the - * current node is part of the mask, we use the zonelist for + * current node isn't part of the mask, we use the zonelist for * the first node in the mask instead. */ if (unlikely(gfp & __GFP_THISNODE) && unlikely(!node_isset(nd, policy->v.nodes))) nd = first_node(policy->v.nodes); break; - case MPOL_INTERLEAVE: /* should not happen */ - break; default: BUG(); }