Commit 6eb27e1fdf5781719a3d2e90e6c89fa012135c62
Committed by
Linus Torvalds
1 parent
6d556294d5
Exists in
master
and in
20 other branches
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 <lliubbo@gmail.com> Acked-by: David Rientjes <rientjes@google.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff
mm/mempolicy.c
... | ... | @@ -1441,14 +1441,12 @@ |
1441 | 1441 | /* |
1442 | 1442 | * Normally, MPOL_BIND allocations are node-local within the |
1443 | 1443 | * allowed nodemask. However, if __GFP_THISNODE is set and the |
1444 | - * current node is part of the mask, we use the zonelist for | |
1444 | + * current node isn't part of the mask, we use the zonelist for | |
1445 | 1445 | * the first node in the mask instead. |
1446 | 1446 | */ |
1447 | 1447 | if (unlikely(gfp & __GFP_THISNODE) && |
1448 | 1448 | unlikely(!node_isset(nd, policy->v.nodes))) |
1449 | 1449 | nd = first_node(policy->v.nodes); |
1450 | - break; | |
1451 | - case MPOL_INTERLEAVE: /* should not happen */ | |
1452 | 1450 | break; |
1453 | 1451 | default: |
1454 | 1452 | BUG(); |