]> git.baikalelectronics.ru Git - kernel.git/commit
mm/slab: restructure kmem_cache_create() debug checks
authorShuah Khan <shuah.khan@hp.com>
Thu, 16 Aug 2012 07:09:46 +0000 (00:09 -0700)
committerPekka Enberg <penberg@kernel.org>
Thu, 16 Aug 2012 07:14:18 +0000 (10:14 +0300)
commit534b94780b1ca1ccd3ac5ac4103d1bbb377f72b2
treec1e86b43b7aeeb6b9f0364f8274b2726432b4a46
parent33d5609aee791e00f6cdc3f768c6aefa12888140
mm/slab: restructure kmem_cache_create() debug checks

kmem_cache_create() does cache integrity checks when CONFIG_DEBUG_VM is
defined.  These checks interspersed with the regular code path has lead
to compile time warnings when compiled without CONFIG_DEBUG_VM defined.
Restructuring the code to move the integrity checks in to a new function
would eliminate the current compile warning problem and also will allow
for future changes to the debug only code to evolve without introducing
new warnings in the regular path.

This restructuring work is based on the discussion in the following
thread:

https://lkml.org/lkml/2012/7/13/424

[akpm@linux-foundation.org: fix build, cleanup]
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slab_common.c