diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-03-19 16:42:07 -0400 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-03-26 13:42:28 -0400 |
commit | 53625b4204753b904addd40ca96d9ba802e6977d (patch) | |
tree | b5f3f6e526b8800491cc9952926e6e46bf623df8 | |
parent | 05dda977f2574c3341abef9b74c27d2b362e1e3a (diff) |
count_partial() is not used if !SLUB_DEBUG and !CONFIG_SLABINFO
Avoid warnings about unused functions if neither SLUB_DEBUG nor CONFIG_SLABINFO
is defined. This patch will be reversed when slab defrag is merged since slab
defrag requires count_partial() to determine the fragmentation status of
slab caches.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2685,6 +2685,7 @@ void kfree(const void *x) | |||
2685 | } | 2685 | } |
2686 | EXPORT_SYMBOL(kfree); | 2686 | EXPORT_SYMBOL(kfree); |
2687 | 2687 | ||
2688 | #if defined(SLUB_DEBUG) || defined(CONFIG_SLABINFO) | ||
2688 | static unsigned long count_partial(struct kmem_cache_node *n) | 2689 | static unsigned long count_partial(struct kmem_cache_node *n) |
2689 | { | 2690 | { |
2690 | unsigned long flags; | 2691 | unsigned long flags; |
@@ -2697,6 +2698,7 @@ static unsigned long count_partial(struct kmem_cache_node *n) | |||
2697 | spin_unlock_irqrestore(&n->list_lock, flags); | 2698 | spin_unlock_irqrestore(&n->list_lock, flags); |
2698 | return x; | 2699 | return x; |
2699 | } | 2700 | } |
2701 | #endif | ||
2700 | 2702 | ||
2701 | /* | 2703 | /* |
2702 | * kmem_cache_shrink removes empty slabs from the partial lists and sorts | 2704 | * kmem_cache_shrink removes empty slabs from the partial lists and sorts |