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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Dec 2012 11:20:37 +0000 (11:20 +0000)
commit65a777980f38d7f80eb726aec2572580fb9a267d
tree231ddf7318b3f7a110b46f3038b048488148ba86
parent39d18dc4b8b0c000fa681cbae10ac3f8a132814b
mm: soft offline: split thp at the beginning of soft_offline_page()

commit 783657a7dc20e5c0efbc9a09a9dd38e238a723da upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
mm/memory-failure.c