lkml.org 
[lkml]   [2011]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[slubllv3 05/21] 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>

---
mm/slub.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2011-04-15 12:54:21.000000000 -0500
+++ linux-2.6/mm/slub.c 2011-04-15 12:54:21.000000000 -0500
@@ -2057,10 +2057,9 @@ static void __slab_free(struct kmem_cach
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;
}

/*


\
 
 \ /
  Last update: 2011-04-15 22:53    [W:0.266 / U:0.344 seconds]
©2003-2014 Jasper Spaans. hosted at Digital Ocean