aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slob.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 14:44:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 14:44:08 -0400
commitb57bdda58cda0aaf6def042d101dd85977a286ed (patch)
tree7f63afddb8275d67214d7a89cfc8a65815e79d42 /mm/slob.c
parentcc41f5cede3c63836d1c0958204630b07f5b5ee7 (diff)
parent415cb47998c54195710d413c3d95e37a9339c1e8 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: Allow removal of slab caches during boot Revert "slub: Allow removal of slab caches during boot" slub numa: Fix rare allocation from unexpected node slab: use deferable timers for its periodic housekeeping slub: Use kmem_cache flags to detect if slab is in debugging mode. slub: Allow removal of slab caches during boot slub: Check kasprintf results in kmem_cache_init() SLUB: Constants need UL slub: Use a constant for a unspecified node. SLOB: Free objects to their own list slab: fix caller tracking on !CONFIG_DEBUG_SLAB && CONFIG_TRACING
Diffstat (limited to 'mm/slob.c')
-rw-r--r--mm/slob.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/slob.c b/mm/slob.c
index 3f19a347dabf..d582171c8101 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -396,6 +396,7 @@ static void slob_free(void *block, int size)
396 slob_t *prev, *next, *b = (slob_t *)block; 396 slob_t *prev, *next, *b = (slob_t *)block;
397 slobidx_t units; 397 slobidx_t units;
398 unsigned long flags; 398 unsigned long flags;
399 struct list_head *slob_list;
399 400
400 if (unlikely(ZERO_OR_NULL_PTR(block))) 401 if (unlikely(ZERO_OR_NULL_PTR(block)))
401 return; 402 return;
@@ -424,7 +425,13 @@ static void slob_free(void *block, int size)
424 set_slob(b, units, 425 set_slob(b, units,
425 (void *)((unsigned long)(b + 426 (void *)((unsigned long)(b +
426 SLOB_UNITS(PAGE_SIZE)) & PAGE_MASK)); 427 SLOB_UNITS(PAGE_SIZE)) & PAGE_MASK));
427 set_slob_page_free(sp, &free_slob_small); 428 if (size < SLOB_BREAK1)
429 slob_list = &free_slob_small;
430 else if (size < SLOB_BREAK2)
431 slob_list = &free_slob_medium;
432 else
433 slob_list = &free_slob_large;
434 set_slob_page_free(sp, slob_list);
428 goto out; 435 goto out;
429 } 436 }
430 437