]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memory-failure: do code refactor of soft_offline_page()
authorXishi Qiu <qiuxishi@huawei.com>
Wed, 20 Feb 2013 02:14:32 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:41 +0000 (16:52 +1100)
commit6354c5677368ffc60047cbc00f2c379c86a1d14e
tree68040beeef3882c08e8eafbdbe15df00a92191fc
parent8de4c62883425559e17a79c2007bf1b648af8837
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