diff options
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 38f89650bc84..cf18f0942553 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1136,7 +1136,9 @@ static unsigned interleave_nodes(struct mempolicy *policy) | |||
1136 | */ | 1136 | */ |
1137 | unsigned slab_node(struct mempolicy *policy) | 1137 | unsigned slab_node(struct mempolicy *policy) |
1138 | { | 1138 | { |
1139 | switch (policy->policy) { | 1139 | int pol = policy ? policy->policy : MPOL_DEFAULT; |
1140 | |||
1141 | switch (pol) { | ||
1140 | case MPOL_INTERLEAVE: | 1142 | case MPOL_INTERLEAVE: |
1141 | return interleave_nodes(policy); | 1143 | return interleave_nodes(policy); |
1142 | 1144 | ||