diff options
author | zhenwei pi <pizhenwei@bytedance.com> | 2022-05-12 20:23:09 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-05-13 07:20:19 -0700 |
commit | c8bd84f73fd6215d5b8d0b3cfc914a3671b16d1c (patch) | |
tree | f5d419b3dca78499e45c2cfa19a6f24c6cef89dc /mm/page_alloc.c | |
parent | 60f272f6b09a8f14156df88cccd21447ab394452 (diff) | |
download | linux-c8bd84f73fd6215d5b8d0b3cfc914a3671b16d1c.tar.bz2 |
mm/memory-failure.c: simplify num_poisoned_pages_dec
Don't decrease the number of poisoned pages in page_alloc.c, let the
memory-failure.c do inc/dec poisoned pages only.
Also simplify unpoison_memory(), only decrease the number of
poisoned pages when:
- TestClearPageHWPoison() succeed
- put_page_back_buddy succeed
After decreasing, print necessary log.
Finally, remove clear_page_hwpoison() and unpoison_taken_off_page().
Link: https://lkml.kernel.org/r/20220509105641.491313-3-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>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 732e01e9d0e0..a4a8fbbd6217 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -9497,7 +9497,6 @@ bool put_page_back_buddy(struct page *page) ClearPageHWPoisonTakenOff(page); __free_one_page(page, pfn, zone, 0, migratetype, FPI_NONE); if (TestClearPageHWPoison(page)) { - num_poisoned_pages_dec(); ret = true; } } |