aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-04-15 15:48:16 -0400
committerPekka Enberg <penberg@kernel.org>2011-04-17 07:03:20 -0400
commit8dc16c6c04b1a82d00a8464ccc08e1fe17d0ff82 (patch)
tree8652572fe6cb411516c5d217eb25bbc6376e3036 /mm/slub.c
parentdc1fb7f43636754a4d06f7bdb8ea3269a7d71d6d (diff)
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>
Diffstat (limited to 'mm/slub.c')
-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,
2057 slab_lock(page); 2057 slab_lock(page);
2058 stat(s, FREE_SLOWPATH); 2058 stat(s, FREE_SLOWPATH);
2059 2059
2060 if (kmem_cache_debug(s)) 2060 if (kmem_cache_debug(s) && !free_debug_processing(s, page, x, addr))
2061 goto debug; 2061 goto out_unlock;
2062 2062
2063checks_ok:
2064 prior = page->freelist; 2063 prior = page->freelist;
2065 set_freepointer(s, object, prior); 2064 set_freepointer(s, object, prior);
2066 page->freelist = object; 2065 page->freelist = object;
@@ -2104,12 +2103,6 @@ slab_empty:
2104#endif 2103#endif
2105 stat(s, FREE_SLAB); 2104 stat(s, FREE_SLAB);
2106 discard_slab(s, page); 2105 discard_slab(s, page);
2107 return;
2108
2109debug:
2110 if (!free_debug_processing(s, page, x, addr))
2111 goto out_unlock;
2112 goto checks_ok;
2113} 2106}
2114 2107
2115/* 2108/*