From: Alastair D'Silva Date: Mon, 23 Sep 2019 22:36:30 +0000 (-0700) Subject: mm/sparse.c: don't manually decrement num_poisoned_pages X-Git-Tag: v5.4-rc1~55^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f82883c6d9af516c2a7f9fe85eb09e9c25bbe0a;p=platform%2Fkernel%2Flinux-rpi.git mm/sparse.c: don't manually decrement num_poisoned_pages Use the function written to do it instead. Link: http://lkml.kernel.org/r/20190827053656.32191-2-alastair@au1.ibm.com Signed-off-by: Alastair D'Silva Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Acked-by: Mike Rapoport Reviewed-by: Wei Yang Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/sparse.c b/mm/sparse.c index a167902..d7af5cf 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include "internal.h" #include @@ -908,7 +910,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) for (i = 0; i < nr_pages; i++) { if (PageHWPoison(&memmap[i])) { - atomic_long_sub(1, &num_poisoned_pages); + num_poisoned_pages_dec(); ClearPageHWPoison(&memmap[i]); } }