Commit 8dc16c6c authored by Christoph Lameter's avatar Christoph Lameter Committed by Pekka Enberg

slub: Move debug handlign in __slab_free

Its easier to read if its with the check for debugging flags.
Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent dc1fb7f4
...@@ -2057,10 +2057,9 @@ static void __slab_free(struct kmem_cache *s, struct page *page, ...@@ -2057,10 +2057,9 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
slab_lock(page); slab_lock(page);
stat(s, FREE_SLOWPATH); stat(s, FREE_SLOWPATH);
if (kmem_cache_debug(s)) if (kmem_cache_debug(s) && !free_debug_processing(s, page, x, addr))
goto debug; goto out_unlock;
checks_ok:
prior = page->freelist; prior = page->freelist;
set_freepointer(s, object, prior); set_freepointer(s, object, prior);
page->freelist = object; page->freelist = object;
...@@ -2104,12 +2103,6 @@ static void __slab_free(struct kmem_cache *s, struct page *page, ...@@ -2104,12 +2103,6 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
#endif #endif
stat(s, FREE_SLAB); stat(s, FREE_SLAB);
discard_slab(s, page); discard_slab(s, page);
return;
debug:
if (!free_debug_processing(s, page, x, addr))
goto out_unlock;
goto checks_ok;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment