]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memory-failure: do code refactor of soft_offline_page()
authorXishi Qiu <qiuxishi@huawei.com>
Thu, 7 Feb 2013 01:26:43 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:36 +0000 (16:46 +1100)
commit1ad691a39985d32cbc8705e3c7db16b64defaadc
treeb220c4f731b4c07b27d25f6a7d80591d6e7a349a
parentd6d8db8f7c863264c3a0508a2ca51848976e6c58
memory-failure: do code refactor of soft_offline_page()

There are too many return points randomly intermingled with some "goto
done" return points.  So adjust the function structure, one for the
success path, the other for the failure path.  Use atomic_long_inc instead
of atomic_long_add.

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c