diff options
author | Li Zefan <lizefan@huawei.com> | 2013-06-05 05:15:35 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-06-05 16:55:13 -0400 |
commit | 67bd2c59850de20d0ecdc8084cbbfe34e53b6804 (patch) | |
tree | 62c3d7d42c0b4d5a9ea5672458ddd9af3d2e8af3 /kernel/cpuset.c | |
parent | 40df2deb50570b288b7067b111af0aa9ca640e6f (diff) |
cpuset: remove unnecessary variable in cpuset_attach()
We can just use oldcs->mems_allowed.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index d753837cca33..dbef832e5e2d 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -1407,8 +1407,7 @@ static cpumask_var_t cpus_attach; | |||
1407 | 1407 | ||
1408 | static void cpuset_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) | 1408 | static void cpuset_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) |
1409 | { | 1409 | { |
1410 | /* static bufs protected by cpuset_mutex */ | 1410 | /* static buf protected by cpuset_mutex */ |
1411 | static nodemask_t cpuset_attach_nodemask_from; | ||
1412 | static nodemask_t cpuset_attach_nodemask_to; | 1411 | static nodemask_t cpuset_attach_nodemask_to; |
1413 | struct mm_struct *mm; | 1412 | struct mm_struct *mm; |
1414 | struct task_struct *task; | 1413 | struct task_struct *task; |
@@ -1442,13 +1441,12 @@ static void cpuset_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) | |||
1442 | * Change mm, possibly for multiple threads in a threadgroup. This is | 1441 | * Change mm, possibly for multiple threads in a threadgroup. This is |
1443 | * expensive and may sleep. | 1442 | * expensive and may sleep. |
1444 | */ | 1443 | */ |
1445 | cpuset_attach_nodemask_from = oldcs->mems_allowed; | ||
1446 | cpuset_attach_nodemask_to = cs->mems_allowed; | 1444 | cpuset_attach_nodemask_to = cs->mems_allowed; |
1447 | mm = get_task_mm(leader); | 1445 | mm = get_task_mm(leader); |
1448 | if (mm) { | 1446 | if (mm) { |
1449 | mpol_rebind_mm(mm, &cpuset_attach_nodemask_to); | 1447 | mpol_rebind_mm(mm, &cpuset_attach_nodemask_to); |
1450 | if (is_memory_migrate(cs)) | 1448 | if (is_memory_migrate(cs)) |
1451 | cpuset_migrate_mm(mm, &cpuset_attach_nodemask_from, | 1449 | cpuset_migrate_mm(mm, &oldcs->mems_allowed, |
1452 | &cpuset_attach_nodemask_to); | 1450 | &cpuset_attach_nodemask_to); |
1453 | mmput(mm); | 1451 | mmput(mm); |
1454 | } | 1452 | } |