lkml.org 
[lkml]   [2019]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] mm: Don't manually decrement num_poisoned_pages
On Tue, Aug 27, 2019 at 03:36:54PM +1000, Alastair D'Silva wrote:
>From: Alastair D'Silva <alastair@d-silva.org>
>
>Use the function written to do it instead.
>
>Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>

>---
> mm/sparse.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/mm/sparse.c b/mm/sparse.c
>index 72f010d9bff5..e41917a7e844 100644
>--- a/mm/sparse.c
>+++ b/mm/sparse.c
>@@ -11,6 +11,8 @@
> #include <linux/export.h>
> #include <linux/spinlock.h>
> #include <linux/vmalloc.h>
>+#include <linux/swap.h>
>+#include <linux/swapops.h>
>
> #include "internal.h"
> #include <asm/dma.h>
>@@ -898,7 +900,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]);
> }
> }
>--
>2.21.0

--
Wei Yang
Help you, Help me

\
 
 \ /
  Last update: 2019-08-28 02:40    [W:0.061 / U:2.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site