diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpuset.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 345ace5117de..a841b5c01ef9 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -375,14 +375,9 @@ void cpuset_update_task_memory_state(void) | |||
375 | struct task_struct *tsk = current; | 375 | struct task_struct *tsk = current; |
376 | struct cpuset *cs; | 376 | struct cpuset *cs; |
377 | 377 | ||
378 | if (task_cs(tsk) == &top_cpuset) { | 378 | rcu_read_lock(); |
379 | /* Don't need rcu for top_cpuset. It's never freed. */ | 379 | my_cpusets_mem_gen = task_cs(tsk)->mems_generation; |
380 | my_cpusets_mem_gen = top_cpuset.mems_generation; | 380 | rcu_read_unlock(); |
381 | } else { | ||
382 | rcu_read_lock(); | ||
383 | my_cpusets_mem_gen = task_cs(tsk)->mems_generation; | ||
384 | rcu_read_unlock(); | ||
385 | } | ||
386 | 381 | ||
387 | if (my_cpusets_mem_gen != tsk->cpuset_mems_generation) { | 382 | if (my_cpusets_mem_gen != tsk->cpuset_mems_generation) { |
388 | mutex_lock(&callback_mutex); | 383 | mutex_lock(&callback_mutex); |