Commit 1a4ce5d9 authored by Nick Piggin's avatar Nick Piggin Committed by Pekka Enberg

slqb: fix compilation warning

gather_stats is not used if CONFIG_SLQB_SYSFS is not selected. Make
it conditional and avoid the warning.
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent f8f74d37
...@@ -3121,6 +3121,7 @@ static void gather_stats_locked(struct kmem_cache *s, ...@@ -3121,6 +3121,7 @@ static void gather_stats_locked(struct kmem_cache *s,
stats->nr_objects = stats->nr_slabs * s->objects; stats->nr_objects = stats->nr_slabs * s->objects;
} }
#ifdef CONFIG_SLQB_SYSFS
static void gather_stats(struct kmem_cache *s, struct stats_gather *stats) static void gather_stats(struct kmem_cache *s, struct stats_gather *stats)
{ {
down_read(&slqb_lock); /* hold off hotplug */ down_read(&slqb_lock); /* hold off hotplug */
...@@ -3128,6 +3129,7 @@ static void gather_stats(struct kmem_cache *s, struct stats_gather *stats) ...@@ -3128,6 +3129,7 @@ static void gather_stats(struct kmem_cache *s, struct stats_gather *stats)
up_read(&slqb_lock); up_read(&slqb_lock);
} }
#endif #endif
#endif
/* /*
* The /proc/slabinfo ABI * The /proc/slabinfo ABI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment