aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpuset.c4
-rw-r--r--kernel/fork.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index c9923e3c9a3b..024888bb9814 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -941,7 +941,7 @@ static int update_nodemask(struct cpuset *cs, char *buf)
941 cs->mems_generation = cpuset_mems_generation++; 941 cs->mems_generation = cpuset_mems_generation++;
942 mutex_unlock(&callback_mutex); 942 mutex_unlock(&callback_mutex);
943 943
944 cpuset_being_rebound = cs; /* causes mpol_copy() rebind */ 944 cpuset_being_rebound = cs; /* causes mpol_dup() rebind */
945 945
946 fudge = 10; /* spare mmarray[] slots */ 946 fudge = 10; /* spare mmarray[] slots */
947 fudge += cpus_weight(cs->cpus_allowed); /* imagine one fork-bomb/cpu */ 947 fudge += cpus_weight(cs->cpus_allowed); /* imagine one fork-bomb/cpu */
@@ -992,7 +992,7 @@ static int update_nodemask(struct cpuset *cs, char *buf)
992 * rebind the vma mempolicies of each mm in mmarray[] to their 992 * rebind the vma mempolicies of each mm in mmarray[] to their
993 * new cpuset, and release that mm. The mpol_rebind_mm() 993 * new cpuset, and release that mm. The mpol_rebind_mm()
994 * call takes mmap_sem, which we couldn't take while holding 994 * call takes mmap_sem, which we couldn't take while holding
995 * tasklist_lock. Forks can happen again now - the mpol_copy() 995 * tasklist_lock. Forks can happen again now - the mpol_dup()
996 * cpuset_being_rebound check will catch such forks, and rebind 996 * cpuset_being_rebound check will catch such forks, and rebind
997 * their vma mempolicies too. Because we still hold the global 997 * their vma mempolicies too. Because we still hold the global
998 * cgroup_mutex, we know that no other rebind effort will 998 * cgroup_mutex, we know that no other rebind effort will
diff --git a/kernel/fork.c b/kernel/fork.c
index 1a5ae2084574..6067e429f281 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -279,7 +279,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
279 if (!tmp) 279 if (!tmp)
280 goto fail_nomem; 280 goto fail_nomem;
281 *tmp = *mpnt; 281 *tmp = *mpnt;
282 pol = mpol_copy(vma_policy(mpnt)); 282 pol = mpol_dup(vma_policy(mpnt));
283 retval = PTR_ERR(pol); 283 retval = PTR_ERR(pol);
284 if (IS_ERR(pol)) 284 if (IS_ERR(pol))
285 goto fail_nomem_policy; 285 goto fail_nomem_policy;
@@ -1116,7 +1116,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1116 p->audit_context = NULL; 1116 p->audit_context = NULL;
1117 cgroup_fork(p); 1117 cgroup_fork(p);
1118#ifdef CONFIG_NUMA 1118#ifdef CONFIG_NUMA
1119 p->mempolicy = mpol_copy(p->mempolicy); 1119 p->mempolicy = mpol_dup(p->mempolicy);
1120 if (IS_ERR(p->mempolicy)) { 1120 if (IS_ERR(p->mempolicy)) {
1121 retval = PTR_ERR(p->mempolicy); 1121 retval = PTR_ERR(p->mempolicy);
1122 p->mempolicy = NULL; 1122 p->mempolicy = NULL;