Skip to content

Commit

Permalink
slub: Move debug handlign in __slab_free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Apr 17, 2011
1 parent dc1fb7f commit 8dc16c6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 8dc16c6

Please sign in to comment.