summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-04-15 21:48:16 +0200
committerPekka Enberg <penberg@kernel.org>2011-04-17 13:03:20 +0200
commit8dc16c6c04b1a82d00a8464ccc08e1fe17d0ff82 (patch)
tree8652572fe6cb411516c5d217eb25bbc6376e3036
parentslub: Move node determination out of hotpath (diff)
downloadlinux-8dc16c6c04b1a82d00a8464ccc08e1fe17d0ff82.tar.xz
linux-8dc16c6c04b1a82d00a8464ccc08e1fe17d0ff82.zip
slub: Move debug handlign in __slab_free
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>
-rw-r--r--mm/slub.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 301360bc00c6..c952fac112e8 100644
--- 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;
}
/*