Commit 9f82883c authored by Alastair D'Silva's avatar Alastair D'Silva Committed by Linus Torvalds

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.comSigned-off-by: default avatarAlastair D'Silva <alastair@d-silva.org>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Reviewed-by: default avatarWei Yang <richardw.yang@linux.intel.com>
Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c1cbc3ee
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include "internal.h" #include "internal.h"
#include <asm/dma.h> #include <asm/dma.h>
...@@ -908,7 +910,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) ...@@ -908,7 +910,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
for (i = 0; i < nr_pages; i++) { for (i = 0; i < nr_pages; i++) {
if (PageHWPoison(&memmap[i])) { if (PageHWPoison(&memmap[i])) {
atomic_long_sub(1, &num_poisoned_pages); num_poisoned_pages_dec();
ClearPageHWPoison(&memmap[i]); ClearPageHWPoison(&memmap[i]);
} }
} }
......
Markdown is supported
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