]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/memory-failure.c: clean up soft_offline_page()
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Wed, 20 Feb 2013 02:14:33 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:41 +0000 (16:52 +1100)
commitcf45371cfce566fbe2cdab4972c04e3c2c18570e
tree102c2784dea6ad818371e815f0fcb11c1ffa5b10
parentfd63d411c02bd04d8c727e5cfd6b3b828a6aeca3
mm/memory-failure.c: clean up soft_offline_page()

Currently soft_offline_page() is hard to maintain because it has many
return points and goto statements.  All of this mess come from
get_any_page().  This function should only get page refcount as the name
implies, but it does some page isolating actions like SetPageHWPoison()
and dequeuing hugepage.  This patch corrects it and introduces some
internal subroutines to make soft offlining code more readable and
maintainable.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c