summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-05-16 22:26:06 +0200
committerPekka Enberg <penberg@kernel.org>2011-05-17 21:16:08 +0200
commit6332aa9d25e911cc97aa9cc09acee21afda07ea6 (patch)
tree6b931efc6453812784948ab33a0e0aa123f689c1
parentslub: Remove CONFIG_CMPXCHG_LOCAL ifdeffery (diff)
downloadlinux-6332aa9d25e911cc97aa9cc09acee21afda07ea6.tar.xz
linux-6332aa9d25e911cc97aa9cc09acee21afda07ea6.zip
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 <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 461199f019d6..8657ab838b82 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:
*/