Skip to content

Commit

Permalink
slub: Avoid warning for !CONFIG_SLUB_DEBUG
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed May 17, 2011
1 parent 1759415 commit 6332aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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:
*/
Expand Down

0 comments on commit 6332aa9

Please sign in to comment.