mm: soft offline: split thp at the beginning of soft_offline_page()
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Thu, 29 Nov 2012 21:54:34 +0000 (13:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Nov 2012 16:51:18 +0000 (08:51 -0800)
commit783657a7dc20e5c0efbc9a09a9dd38e238a723da
tree0c0d469c5d5ac18ecc89e4d7de27be652a07166f
parent782fd30406ecb9d9b082816abe0c6008fc72a7b0
mm: soft offline: split thp at the beginning of soft_offline_page()

When we try to soft-offline a thp tail page, put_page() is called on the
tail page unthinkingly and VM_BUG_ON is triggered in put_compound_page().

This patch splits thp before going into the main body of soft-offlining.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c