diff options
author | Li Zefan <lizefan@huawei.com> | 2013-06-05 05:15:48 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-06-05 16:55:14 -0400 |
commit | 249cc86db7492dc8de1d2eddebc6bcc4ab2a8e9e (patch) | |
tree | be40a0fccba259600d9b88b98b704b55f22cb42d /kernel/cpuset.c | |
parent | 67bd2c59850de20d0ecdc8084cbbfe34e53b6804 (diff) |
cpuset: remove cpuset_test_cpumask()
The test is done in set_cpus_allowed_ptr(), so it's redundant.
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 | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index dbef832e5e2d..51f8e1d5a2a9 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -784,23 +784,6 @@ void rebuild_sched_domains(void) | |||
784 | } | 784 | } |
785 | 785 | ||
786 | /** | 786 | /** |
787 | * cpuset_test_cpumask - test a task's cpus_allowed versus its cpuset's | ||
788 | * @tsk: task to test | ||
789 | * @scan: struct cgroup_scanner contained in its struct cpuset_hotplug_scanner | ||
790 | * | ||
791 | * Call with cpuset_mutex held. May take callback_mutex during call. | ||
792 | * Called for each task in a cgroup by cgroup_scan_tasks(). | ||
793 | * Return nonzero if this tasks's cpus_allowed mask should be changed (in other | ||
794 | * words, if its mask is not equal to its cpuset's mask). | ||
795 | */ | ||
796 | static int cpuset_test_cpumask(struct task_struct *tsk, | ||
797 | struct cgroup_scanner *scan) | ||
798 | { | ||
799 | return !cpumask_equal(&tsk->cpus_allowed, | ||
800 | (cgroup_cs(scan->cg))->cpus_allowed); | ||
801 | } | ||
802 | |||
803 | /** | ||
804 | * cpuset_change_cpumask - make a task's cpus_allowed the same as its cpuset's | 787 | * cpuset_change_cpumask - make a task's cpus_allowed the same as its cpuset's |
805 | * @tsk: task to test | 788 | * @tsk: task to test |
806 | * @scan: struct cgroup_scanner containing the cgroup of the task | 789 | * @scan: struct cgroup_scanner containing the cgroup of the task |
@@ -835,7 +818,7 @@ static void update_tasks_cpumask(struct cpuset *cs, struct ptr_heap *heap) | |||
835 | struct cgroup_scanner scan; | 818 | struct cgroup_scanner scan; |
836 | 819 | ||
837 | scan.cg = cs->css.cgroup; | 820 | scan.cg = cs->css.cgroup; |
838 | scan.test_task = cpuset_test_cpumask; | 821 | scan.test_task = NULL; |
839 | scan.process_task = cpuset_change_cpumask; | 822 | scan.process_task = cpuset_change_cpumask; |
840 | scan.heap = heap; | 823 | scan.heap = heap; |
841 | cgroup_scan_tasks(&scan); | 824 | cgroup_scan_tasks(&scan); |