]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Clean up hotplug slab some more
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Mar 2004 14:49:26 +0000 (06:49 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 8 Mar 2004 14:49:26 +0000 (06:49 -0800)
This is a cleaner fix for the previous bogon fix.

mm/slab.c

index b87502275ea5e7105b9d370d9da55c10baa5aa45..42b95f5895c1515d21a8c4d074de8d8e460fcd69 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -601,7 +601,6 @@ static int __devinit cpuup_callback(struct notifier_block *nfb,
 {
        long cpu = (long)hcpu;
        kmem_cache_t* cachep;
-       struct list_head *p;
 
        switch (action) {
        case CPU_UP_PREPARE:
@@ -634,9 +633,8 @@ static int __devinit cpuup_callback(struct notifier_block *nfb,
        case CPU_UP_CANCELED:
                down(&cache_chain_sem);
 
-               list_for_each(p, &cache_chain) {
+               list_for_each_entry(cachep, &cache_chain, next) {
                        struct array_cache *nc;
-                       kmem_cache_t* cachep = list_entry(p, kmem_cache_t, next);
 
                        nc = cachep->array[cpu];
                        cachep->array[cpu] = NULL;