aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index ee5ec386aa8b..31737957cb62 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2070,7 +2070,9 @@ static int cpuset_track_online_cpus(struct notifier_block *unused_nb,
2070 } 2070 }
2071 2071
2072 cgroup_lock(); 2072 cgroup_lock();
2073 mutex_lock(&callback_mutex);
2073 cpumask_copy(top_cpuset.cpus_allowed, cpu_online_mask); 2074 cpumask_copy(top_cpuset.cpus_allowed, cpu_online_mask);
2075 mutex_unlock(&callback_mutex);
2074 scan_for_empty_cpusets(&top_cpuset); 2076 scan_for_empty_cpusets(&top_cpuset);
2075 ndoms = generate_sched_domains(&doms, &attr); 2077 ndoms = generate_sched_domains(&doms, &attr);
2076 cgroup_unlock(); 2078 cgroup_unlock();
@@ -2093,11 +2095,12 @@ static int cpuset_track_online_nodes(struct notifier_block *self,
2093 cgroup_lock(); 2095 cgroup_lock();
2094 switch (action) { 2096 switch (action) {
2095 case MEM_ONLINE: 2097 case MEM_ONLINE:
2096 top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
2097 break;
2098 case MEM_OFFLINE: 2098 case MEM_OFFLINE:
2099 mutex_lock(&callback_mutex);
2099 top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; 2100 top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
2100 scan_for_empty_cpusets(&top_cpuset); 2101 mutex_unlock(&callback_mutex);
2102 if (action == MEM_OFFLINE)
2103 scan_for_empty_cpusets(&top_cpuset);
2101 break; 2104 break;
2102 default: 2105 default:
2103 break; 2106 break;