slub: fix bug in slub debug support
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 26 Jul 2007 18:54:34 +0000 (20:54 +0200)
committerChristoph Lameter <clameter@sgi.com>
Mon, 30 Jul 2007 19:15:15 +0000 (12:15 -0700)
We ClearSlabDebug() before the last SlabDebug() check. Clear it later.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
mm/slub.c

index 221809f1c1350b48fea34b00c17d6a9400e778b3..6c6d74ff06941e0baf4d923cc0f103e2b1e7297d 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1131,6 +1131,7 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
                slab_pad_check(s, page);
                for_each_object(p, s, page_address(page))
                        check_object(s, page, p, 0);
+               ClearSlabDebug(page);
        }
 
        mod_zone_page_state(page_zone(page),
@@ -1169,7 +1170,6 @@ static void discard_slab(struct kmem_cache *s, struct page *page)
 
        atomic_long_dec(&n->nr_slabs);
        reset_page_mapcount(page);
-       ClearSlabDebug(page);
        __ClearPageSlab(page);
        free_slab(s, page);
 }