From: Christoph Lameter Date: Mon, 16 May 2011 20:26:06 +0000 (-0500) Subject: slub: Avoid warning for !CONFIG_SLUB_DEBUG X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6332aa9d25e911cc97aa9cc09acee21afda07ea6;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 --- diff --git a/mm/slub.c b/mm/slub.c index 461199f019d..8657ab838b8 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: */