summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-03-19 21:42:07 +0100
committerChristoph Lameter <clameter@sgi.com>2008-03-26 18:42:28 +0100
commit53625b4204753b904addd40ca96d9ba802e6977d (patch)
treeb5f3f6e526b8800491cc9952926e6e46bf623df8 /mm/slub.c
parentLinux 2.6.25-rc7 (diff)
downloadlinux-53625b4204753b904addd40ca96d9ba802e6977d.tar.xz
linux-53625b4204753b904addd40ca96d9ba802e6977d.zip
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>
Diffstat (limited to '')
-rw-r--r--mm/slub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index ca71d5b81e4a..b72bc98e2dc1 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2685,6 +2685,7 @@ void kfree(const void *x)
}
EXPORT_SYMBOL(kfree);
+#if defined(SLUB_DEBUG) || defined(CONFIG_SLABINFO)
static unsigned long count_partial(struct kmem_cache_node *n)
{
unsigned long flags;
@@ -2697,6 +2698,7 @@ static unsigned long count_partial(struct kmem_cache_node *n)
spin_unlock_irqrestore(&n->list_lock, flags);
return x;
}
+#endif
/*
* kmem_cache_shrink removes empty slabs from the partial lists and sorts