author: Michael Wang <yun.wang@linux.alibaba.com> 2021-09-02 14:58:40 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-03 09:58:16 -0700
commit: f87060d345232c7d855167a43faf006e24afa999
parent: 941ca063eb8ed01e66336b1f493e95b107024bc8
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index b3e8c75bee66..2f925615e573 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -68,7 +68,7 @@ atomic_long_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0);
static bool __page_handle_poison(struct page *page)
{
- bool ret;
+ int ret;
zone_pcp_disable(page_zone(page));
ret = dissolve_free_huge_page(page);
@@ -76,7 +76,7 @@ static bool __page_handle_poison(struct page *page)
ret = take_page_off_buddy(page);
zone_pcp_enable(page_zone(page));
- return ret;
+ return ret > 0;
}
static bool page_handle_poison(struct page *page, bool hugepage_or_freepage, bool release)