Commit d9ec0d66 authored by Pekka Enberg's avatar Pekka Enberg

SLQB: Fix compile warnings on UMA and UP

As reported by Stephen Rothwell:

  Today's linux-next build (powerpc allnoconfig) produced this warning:

  mm/slqb.c: In function 'kmem_cache_open':
  mm/slqb.c:2180: warning: label 'error_lock' defined but not used
  mm/slqb.c:2176: warning: label 'error_cpu_array' defined but not used

  Caused by commit 8b9ffd9d52479bd17b5729c9f3acaefa90c7e585 ("slqb: dynamic
  array allocations").

  Clearly neither CONFIG_SMP not CONFIG_NUMA is set.

Fix those up by wrapping the labes in ifdef CONFIG_SMP and CONFIG_NUMA where
appropriate.

Cc: Nick Piggin <npiggin@suse.de>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent 50ed9354
......@@ -2172,12 +2172,12 @@ error_nodes:
error_node_array:
#ifdef CONFIG_NUMA
kmem_cache_dyn_array_free(s->node_slab);
#endif
error_cpu_array:
#endif
#ifdef CONFIG_SMP
kmem_cache_dyn_array_free(s->cpu_slab);
#endif
error_lock:
#endif
up_write(&slqb_lock);
error:
if (flags & SLAB_PANIC)
......
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