From 9f82883c6d9af516c2a7f9fe85eb09e9c25bbe0a Mon Sep 17 00:00:00 2001 From: Alastair D'Silva Date: Mon, 23 Sep 2019 15:36:30 -0700 Subject: 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 --- mm/sparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mm') diff --git a/mm/sparse.c b/mm/sparse.c index a1679024ab5c..d7af5cfdc810 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]); } } -- cgit v1.2.3