slub: disable interrupts in cmpxchg_double_slab when falling back to pagelock
authorChristoph Lameter <cl@linux.com>
Thu, 14 Jul 2011 17:49:12 +0000 (12:49 -0500)
committerPekka Enberg <penberg@kernel.org>
Mon, 18 Jul 2011 12:17:02 +0000 (15:17 +0300)
commit1d07171c5e58e68a76a141970a3a5e816a414ce6
tree9a8dcbf464b150d68daf0295e1ce644c1ec6d987
parent013e896373fc53f3d3c039364a25ccbd1fc0729a
slub: disable interrupts in cmpxchg_double_slab when falling back to pagelock

Split cmpxchg_double_slab into two functions. One for the case where we know that
interrupts are disabled (and therefore the fallback does not need to disable
interrupts) and one for the other cases where fallback will also disable interrupts.

This fixes the issue that __slab_free called cmpxchg_double_slab in some scenarios
without disabling interrupts.

Tested-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c