aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 9dea2b8a7d48..515bfeee027e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -387,7 +387,7 @@ static int contextualize_policy(int mode, nodemask_t *nodes)
387 if (!nodes) 387 if (!nodes)
388 return 0; 388 return 0;
389 389
390 cpuset_update_current_mems_allowed(); 390 cpuset_update_task_memory_state();
391 if (!cpuset_nodes_subset_current_mems_allowed(*nodes)) 391 if (!cpuset_nodes_subset_current_mems_allowed(*nodes))
392 return -EINVAL; 392 return -EINVAL;
393 return mpol_check_policy(mode, nodes); 393 return mpol_check_policy(mode, nodes);
@@ -461,7 +461,7 @@ long do_get_mempolicy(int *policy, nodemask_t *nmask,
461 struct vm_area_struct *vma = NULL; 461 struct vm_area_struct *vma = NULL;
462 struct mempolicy *pol = current->mempolicy; 462 struct mempolicy *pol = current->mempolicy;
463 463
464 cpuset_update_current_mems_allowed(); 464 cpuset_update_task_memory_state();
465 if (flags & ~(unsigned long)(MPOL_F_NODE|MPOL_F_ADDR)) 465 if (flags & ~(unsigned long)(MPOL_F_NODE|MPOL_F_ADDR))
466 return -EINVAL; 466 return -EINVAL;
467 if (flags & MPOL_F_ADDR) { 467 if (flags & MPOL_F_ADDR) {
@@ -1089,7 +1089,7 @@ alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
1089{ 1089{
1090 struct mempolicy *pol = get_vma_policy(current, vma, addr); 1090 struct mempolicy *pol = get_vma_policy(current, vma, addr);
1091 1091
1092 cpuset_update_current_mems_allowed(); 1092 cpuset_update_task_memory_state();
1093 1093
1094 if (unlikely(pol->policy == MPOL_INTERLEAVE)) { 1094 if (unlikely(pol->policy == MPOL_INTERLEAVE)) {
1095 unsigned nid; 1095 unsigned nid;
@@ -1115,7 +1115,7 @@ alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
1115 * interrupt context and apply the current process NUMA policy. 1115 * interrupt context and apply the current process NUMA policy.
1116 * Returns NULL when no page can be allocated. 1116 * Returns NULL when no page can be allocated.
1117 * 1117 *
1118 * Don't call cpuset_update_current_mems_allowed() unless 1118 * Don't call cpuset_update_task_memory_state() unless
1119 * 1) it's ok to take cpuset_sem (can WAIT), and 1119 * 1) it's ok to take cpuset_sem (can WAIT), and
1120 * 2) allocating for current task (not interrupt). 1120 * 2) allocating for current task (not interrupt).
1121 */ 1121 */
@@ -1124,7 +1124,7 @@ struct page *alloc_pages_current(gfp_t gfp, unsigned order)
1124 struct mempolicy *pol = current->mempolicy; 1124 struct mempolicy *pol = current->mempolicy;
1125 1125
1126 if ((gfp & __GFP_WAIT) && !in_interrupt()) 1126 if ((gfp & __GFP_WAIT) && !in_interrupt())
1127 cpuset_update_current_mems_allowed(); 1127 cpuset_update_task_memory_state();
1128 if (!pol || in_interrupt()) 1128 if (!pol || in_interrupt())
1129 pol = &default_policy; 1129 pol = &default_policy;
1130 if (pol->policy == MPOL_INTERLEAVE) 1130 if (pol->policy == MPOL_INTERLEAVE)