diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 91cf85b36dd5..3624dc0e95ed 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -1833,24 +1833,21 @@ static void remove_tasks_in_empty_cpuset(struct cpuset *cs) | |||
1833 | */ | 1833 | */ |
1834 | static void scan_for_empty_cpusets(const struct cpuset *root) | 1834 | static void scan_for_empty_cpusets(const struct cpuset *root) |
1835 | { | 1835 | { |
1836 | LIST_HEAD(queue); | ||
1836 | struct cpuset *cp; /* scans cpusets being updated */ | 1837 | struct cpuset *cp; /* scans cpusets being updated */ |
1837 | struct cpuset *child; /* scans child cpusets of cp */ | 1838 | struct cpuset *child; /* scans child cpusets of cp */ |
1838 | struct list_head queue; | ||
1839 | struct cgroup *cont; | 1839 | struct cgroup *cont; |
1840 | nodemask_t oldmems; | 1840 | nodemask_t oldmems; |
1841 | 1841 | ||
1842 | INIT_LIST_HEAD(&queue); | ||
1843 | |||
1844 | list_add_tail((struct list_head *)&root->stack_list, &queue); | 1842 | list_add_tail((struct list_head *)&root->stack_list, &queue); |
1845 | 1843 | ||
1846 | while (!list_empty(&queue)) { | 1844 | while (!list_empty(&queue)) { |
1847 | cp = container_of(queue.next, struct cpuset, stack_list); | 1845 | cp = list_first_entry(&queue, struct cpuset, stack_list); |
1848 | list_del(queue.next); | 1846 | list_del(queue.next); |
1849 | list_for_each_entry(cont, &cp->css.cgroup->children, sibling) { | 1847 | list_for_each_entry(cont, &cp->css.cgroup->children, sibling) { |
1850 | child = cgroup_cs(cont); | 1848 | child = cgroup_cs(cont); |
1851 | list_add_tail(&child->stack_list, &queue); | 1849 | list_add_tail(&child->stack_list, &queue); |
1852 | } | 1850 | } |
1853 | cont = cp->css.cgroup; | ||
1854 | 1851 | ||
1855 | /* Continue past cpusets with all cpus, mems online */ | 1852 | /* Continue past cpusets with all cpus, mems online */ |
1856 | if (cpus_subset(cp->cpus_allowed, cpu_online_map) && | 1853 | if (cpus_subset(cp->cpus_allowed, cpu_online_map) && |