Skip to content
Commit fa8dd8a9 authored by Xishi Qiu's avatar Xishi Qiu Committed by Linus Torvalds
Browse files

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: default avatarXishi Qiu <qiuxishi@huawei.com>
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Suggested-by: default avatarAndrew 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0ebff32c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment