Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139675
b: refs/heads/master
c: 7f81b1a
h: refs/heads/master
i:
  139673: 08d1e60
  139671: 369ba4b
v: v3
  • Loading branch information
Li Zefan authored and Linus Torvalds committed Apr 3, 2009
1 parent 257814a commit 3c87c74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 010cfac4ca0f9e85f54ba2117a372e72f4fb9a60
refs/heads/master: 7f81b1ae18416b457e4d5ff23f0bd598e8a42224
23 changes: 9 additions & 14 deletions trunk/kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ static inline struct cpuset *task_cs(struct task_struct *task)
return container_of(task_subsys_state(task, cpuset_subsys_id),
struct cpuset, css);
}
struct cpuset_hotplug_scanner {
struct cgroup_scanner scan;
struct cgroup *to;
};

/* bits in struct cpuset flags field */
typedef enum {
Expand Down Expand Up @@ -1890,10 +1886,9 @@ int __init cpuset_init(void)
static void cpuset_do_move_task(struct task_struct *tsk,
struct cgroup_scanner *scan)
{
struct cpuset_hotplug_scanner *chsp;
struct cgroup *new_cgroup = scan->data;

chsp = container_of(scan, struct cpuset_hotplug_scanner, scan);
cgroup_attach_task(chsp->to, tsk);
cgroup_attach_task(new_cgroup, tsk);
}

/**
Expand All @@ -1909,15 +1904,15 @@ static void cpuset_do_move_task(struct task_struct *tsk,
*/
static void move_member_tasks_to_cpuset(struct cpuset *from, struct cpuset *to)
{
struct cpuset_hotplug_scanner scan;
struct cgroup_scanner scan;

scan.scan.cg = from->css.cgroup;
scan.scan.test_task = NULL; /* select all tasks in cgroup */
scan.scan.process_task = cpuset_do_move_task;
scan.scan.heap = NULL;
scan.to = to->css.cgroup;
scan.cg = from->css.cgroup;
scan.test_task = NULL; /* select all tasks in cgroup */
scan.process_task = cpuset_do_move_task;
scan.heap = NULL;
scan.data = to->css.cgroup;

if (cgroup_scan_tasks(&scan.scan))
if (cgroup_scan_tasks(&scan))
printk(KERN_ERR "move_member_tasks_to_cpuset: "
"cgroup_scan_tasks failed\n");
}
Expand Down

0 comments on commit 3c87c74

Please sign in to comment.