提交 38c3bd96 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

slab: use CPU_LOCK_[ACQUIRE|RELEASE]

Looks like this was forgotten when CPU_LOCK_[ACQUIRE|RELEASE] was
introduced.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Gautham Shenoy <ego@in.ibm.com>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 e7407dcc
...@@ -1186,8 +1186,10 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb, ...@@ -1186,8 +1186,10 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
int memsize = sizeof(struct kmem_list3); int memsize = sizeof(struct kmem_list3);
switch (action) { switch (action) {
case CPU_UP_PREPARE: case CPU_LOCK_ACQUIRE:
mutex_lock(&cache_chain_mutex); mutex_lock(&cache_chain_mutex);
break;
case CPU_UP_PREPARE:
/* /*
* We need to do this right in the beginning since * We need to do this right in the beginning since
* alloc_arraycache's are going to use this list. * alloc_arraycache's are going to use this list.
...@@ -1274,16 +1276,9 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb, ...@@ -1274,16 +1276,9 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
} }
break; break;
case CPU_ONLINE: case CPU_ONLINE:
mutex_unlock(&cache_chain_mutex);
start_cpu_timer(cpu); start_cpu_timer(cpu);
break; break;
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
case CPU_DOWN_PREPARE:
mutex_lock(&cache_chain_mutex);
break;
case CPU_DOWN_FAILED:
mutex_unlock(&cache_chain_mutex);
break;
case CPU_DEAD: case CPU_DEAD:
/* /*
* Even if all the cpus of a node are down, we don't free the * Even if all the cpus of a node are down, we don't free the
...@@ -1354,6 +1349,8 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb, ...@@ -1354,6 +1349,8 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
continue; continue;
drain_freelist(cachep, l3, l3->free_objects); drain_freelist(cachep, l3, l3->free_objects);
} }
break;
case CPU_LOCK_RELEASE:
mutex_unlock(&cache_chain_mutex); mutex_unlock(&cache_chain_mutex);
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册