2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 00:26:39 +08:00

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>
This commit is contained in:
Christoph Lameter 2011-04-15 14:48:16 -05:00 committed by Pekka Enberg
parent dc1fb7f436
commit 8dc16c6c04

View File

@ -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;
}
/*