Skip to content

Commit

Permalink
cpuset: remove cpuset_test_cpumask()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and Tejun Heo committed Jun 5, 2013
1 parent 67bd2c5 commit 249cc86
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions kernel/cpuset.c
Original file line number Diff line number Diff line change
@@ -783,23 +783,6 @@ void rebuild_sched_domains(void)
mutex_unlock(&cpuset_mutex);
}

/**
* cpuset_test_cpumask - test a task's cpus_allowed versus its cpuset's
* @tsk: task to test
* @scan: struct cgroup_scanner contained in its struct cpuset_hotplug_scanner
*
* Call with cpuset_mutex held. May take callback_mutex during call.
* Called for each task in a cgroup by cgroup_scan_tasks().
* Return nonzero if this tasks's cpus_allowed mask should be changed (in other
* words, if its mask is not equal to its cpuset's mask).
*/
static int cpuset_test_cpumask(struct task_struct *tsk,
struct cgroup_scanner *scan)
{
return !cpumask_equal(&tsk->cpus_allowed,
(cgroup_cs(scan->cg))->cpus_allowed);
}

/**
* cpuset_change_cpumask - make a task's cpus_allowed the same as its cpuset's
* @tsk: task to test
@@ -835,7 +818,7 @@ static void update_tasks_cpumask(struct cpuset *cs, struct ptr_heap *heap)
struct cgroup_scanner scan;

scan.cg = cs->css.cgroup;
scan.test_task = cpuset_test_cpumask;
scan.test_task = NULL;
scan.process_task = cpuset_change_cpumask;
scan.heap = heap;
cgroup_scan_tasks(&scan);

0 comments on commit 249cc86

Please sign in to comment.