From 6332aa9d25e911cc97aa9cc09acee21afda07ea6 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 16 May 2011 15:26:06 -0500 Subject: slub: Avoid warning for !CONFIG_SLUB_DEBUG Move the #ifdef so that get_map is only defined if CONFIG_SLUB_DEBUG is defined. Reported-by: David Rientjes Signed-off-by: Christoph Lameter Signed-off-by: Pekka Enberg --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 461199f..8657ab8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -326,6 +326,7 @@ static inline int oo_objects(struct kmem_cache_order_objects x) return x.x & OO_MASK; } +#ifdef CONFIG_SLUB_DEBUG /* * Determine a map of object in use on a page. * @@ -341,7 +342,6 @@ static void get_map(struct kmem_cache *s, struct page *page, unsigned long *map) set_bit(slab_index(p, s, addr), map); } -#ifdef CONFIG_SLUB_DEBUG /* * Debug settings: */ -- cgit v1.1