]> 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>
Thu, 7 Feb 2013 01:26:44 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:37 +0000 (16:46 +1100)
commitf68ffa444dec960020d2b389205672a8f9b21507
tree29c4eff2f61818a10617066d18f844d150abf5dd
parente3dc5198c99d181f9735deb6e960d49e888fea6a
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