diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index eedeebe64b1a..14f7070b4ba2 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -2162,10 +2162,9 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) | |||
2162 | mutex_unlock(&callback_mutex); | 2162 | mutex_unlock(&callback_mutex); |
2163 | } | 2163 | } |
2164 | 2164 | ||
2165 | int cpuset_cpus_allowed_fallback(struct task_struct *tsk) | 2165 | void cpuset_cpus_allowed_fallback(struct task_struct *tsk) |
2166 | { | 2166 | { |
2167 | const struct cpuset *cs; | 2167 | const struct cpuset *cs; |
2168 | int cpu; | ||
2169 | 2168 | ||
2170 | rcu_read_lock(); | 2169 | rcu_read_lock(); |
2171 | cs = task_cs(tsk); | 2170 | cs = task_cs(tsk); |
@@ -2186,22 +2185,10 @@ int cpuset_cpus_allowed_fallback(struct task_struct *tsk) | |||
2186 | * changes in tsk_cs()->cpus_allowed. Otherwise we can temporary | 2185 | * changes in tsk_cs()->cpus_allowed. Otherwise we can temporary |
2187 | * set any mask even if it is not right from task_cs() pov, | 2186 | * set any mask even if it is not right from task_cs() pov, |
2188 | * the pending set_cpus_allowed_ptr() will fix things. | 2187 | * the pending set_cpus_allowed_ptr() will fix things. |
2188 | * | ||
2189 | * select_fallback_rq() will fix things ups and set cpu_possible_mask | ||
2190 | * if required. | ||
2189 | */ | 2191 | */ |
2190 | |||
2191 | cpu = cpumask_any_and(&tsk->cpus_allowed, cpu_active_mask); | ||
2192 | if (cpu >= nr_cpu_ids) { | ||
2193 | /* | ||
2194 | * Either tsk->cpus_allowed is wrong (see above) or it | ||
2195 | * is actually empty. The latter case is only possible | ||
2196 | * if we are racing with remove_tasks_in_empty_cpuset(). | ||
2197 | * Like above we can temporary set any mask and rely on | ||
2198 | * set_cpus_allowed_ptr() as synchronization point. | ||
2199 | */ | ||
2200 | do_set_cpus_allowed(tsk, cpu_possible_mask); | ||
2201 | cpu = cpumask_any(cpu_active_mask); | ||
2202 | } | ||
2203 | |||
2204 | return cpu; | ||
2205 | } | 2192 | } |
2206 | 2193 | ||
2207 | void cpuset_init_current_mems_allowed(void) | 2194 | void cpuset_init_current_mems_allowed(void) |