]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory-failure.c: simplify num_poisoned_pages_inc/dec
authorzhenwei pi <pizhenwei@bytedance.com>
Fri, 13 May 2022 03:23:10 +0000 (20:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 13 May 2022 14:20:19 +0000 (07:20 -0700)
commit24a0df5f3acc85ff772d2f8790569faa50440291
tree29eaf4f711fccf9a14ae3db3fd90ae1f733eca45
parent7ad223a5f0d6a636be4ef11ed878216c1ef0d5c3
mm/memory-failure.c: simplify num_poisoned_pages_inc/dec

Originally, do num_poisoned_pages_inc() in memory failure routine, use
num_poisoned_pages_dec() to rollback the number if filtered/ cancelled.

Suggested by Naoya, do num_poisoned_pages_inc() only in action_result(),
this make this clear and simple.

Link: https://lkml.kernel.org/r/20220509105641.491313-6-pizhenwei@bytedance.com
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c