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 ccbdb22147bb..5daf63bd97e7 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -183,7 +183,9 @@ static struct mempolicy *mpol_new(int mode, nodemask_t *nodes) | |||
183 | switch (mode) { | 183 | switch (mode) { |
184 | case MPOL_INTERLEAVE: | 184 | case MPOL_INTERLEAVE: |
185 | policy->v.nodes = *nodes; | 185 | policy->v.nodes = *nodes; |
186 | if (nodes_weight(*nodes) == 0) { | 186 | nodes_and(policy->v.nodes, policy->v.nodes, |
187 | node_states[N_HIGH_MEMORY]); | ||
188 | if (nodes_weight(policy->v.nodes) == 0) { | ||
187 | kmem_cache_free(policy_cache, policy); | 189 | kmem_cache_free(policy_cache, policy); |
188 | return ERR_PTR(-EINVAL); | 190 | return ERR_PTR(-EINVAL); |
189 | } | 191 | } |