提交 8dc16c6c 编写于 作者: C Christoph Lameter 提交者: Pekka Enberg

slub: Move debug handlign in __slab_free

Its easier to read if its with the check for debugging flags.
Signed-off-by: NChristoph Lameter <cl@linux.com>
Signed-off-by: NPekka Enberg <penberg@kernel.org>
上级 dc1fb7f4
......@@ -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 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
#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;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册