aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-05-09 05:34:05 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:51 -0400
commit38c3bd96a0a7d375e12f173c34fbebf9f153cb56 (patch)
tree4c96cfe17f7578eb182471c8ad17653837abc219 /mm/slab.c
parente7407dcc69e077ac34a527842db916abfbc458df (diff)
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: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 01262d26e192..cceb347a354e 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1186,8 +1186,10 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
1186 int memsize = sizeof(struct kmem_list3); 1186 int memsize = sizeof(struct kmem_list3);
1187 1187
1188 switch (action) { 1188 switch (action) {
1189 case CPU_UP_PREPARE: 1189 case CPU_LOCK_ACQUIRE:
1190 mutex_lock(&cache_chain_mutex); 1190 mutex_lock(&cache_chain_mutex);
1191 break;
1192 case CPU_UP_PREPARE:
1191 /* 1193 /*
1192 * We need to do this right in the beginning since 1194 * We need to do this right in the beginning since
1193 * alloc_arraycache's are going to use this list. 1195 * alloc_arraycache's are going to use this list.
@@ -1274,16 +1276,9 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
1274 } 1276 }
1275 break; 1277 break;
1276 case CPU_ONLINE: 1278 case CPU_ONLINE:
1277 mutex_unlock(&cache_chain_mutex);
1278 start_cpu_timer(cpu); 1279 start_cpu_timer(cpu);
1279 break; 1280 break;
1280#ifdef CONFIG_HOTPLUG_CPU 1281#ifdef CONFIG_HOTPLUG_CPU
1281 case CPU_DOWN_PREPARE:
1282 mutex_lock(&cache_chain_mutex);
1283 break;
1284 case CPU_DOWN_FAILED:
1285 mutex_unlock(&cache_chain_mutex);
1286 break;
1287 case CPU_DEAD: 1282 case CPU_DEAD:
1288 /* 1283 /*
1289 * Even if all the cpus of a node are down, we don't free the 1284 * Even if all the cpus of a node are down, we don't free the
@@ -1354,6 +1349,8 @@ free_array_cache:
1354 continue; 1349 continue;
1355 drain_freelist(cachep, l3, l3->free_objects); 1350 drain_freelist(cachep, l3, l3->free_objects);
1356 } 1351 }
1352 break;
1353 case CPU_LOCK_RELEASE:
1357 mutex_unlock(&cache_chain_mutex); 1354 mutex_unlock(&cache_chain_mutex);
1358 break; 1355 break;
1359 } 1356 }