slub: Move debug handlign in __slab_free
authorChristoph Lameter <cl@linux.com>
Fri, 15 Apr 2011 19:48:16 +0000 (14:48 -0500)
committerPekka Enberg <penberg@kernel.org>
Sun, 17 Apr 2011 11:03:20 +0000 (14:03 +0300)
Its easier to read if its with the check for debugging flags.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c

index 301360bc00c6b456d1fd85e736103b0f2852dbf6..c952fac112e858a2b050575710995dbbd7c02ae8 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2057,10 +2057,9 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
        slab_lock(page);
        stat(s, FREE_SLOWPATH);
 
-       if (kmem_cache_debug(s))
-               goto debug;
+       if (kmem_cache_debug(s) && !free_debug_processing(s, page, x, addr))
+               goto out_unlock;
 
-checks_ok:
        prior = page->freelist;
        set_freepointer(s, object, prior);
        page->freelist = object;
@@ -2104,12 +2103,6 @@ slab_empty:
 #endif
        stat(s, FREE_SLAB);
        discard_slab(s, page);
-       return;
-
-debug:
-       if (!free_debug_processing(s, page, x, addr))
-               goto out_unlock;
-       goto checks_ok;
 }
 
 /*