[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1663049446-22310-1-git-send-email-zhaoyang.huang@unisoc.com>
Date: Tue, 13 Sep 2022 14:10:45 +0800
From: "zhaoyang.huang" <zhaoyang.huang@...soc.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Matthew Wilcox <willy@...radead.org>,
Zhaoyang Huang <huangzhaoyang@...il.com>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>, <ke.wang@...soc.com>
Subject: [PATCH 1/2] mm: fix logic error of bulkfree_pcp_prepare
From: Zhaoyang Huang <zhaoyang.huang@...soc.com>
free_pages_check return 0 when result is ok while bulkfree_pcp_prepare
treat it as false wrongly.
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@...soc.com>
---
mm/page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e008a3d..69b15e3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1424,7 +1424,7 @@ static bool free_pcp_prepare(struct page *page, unsigned int order)
static bool bulkfree_pcp_prepare(struct page *page)
{
if (debug_pagealloc_enabled_static())
- return check_free_page(page);
+ return !check_free_page(page);
else
return false;
}
@@ -1445,7 +1445,7 @@ static bool free_pcp_prepare(struct page *page, unsigned int order)
static bool bulkfree_pcp_prepare(struct page *page)
{
- return check_free_page(page);
+ return !check_free_page(page);
}
#endif /* CONFIG_DEBUG_VM */
--
1.9.1
Powered by blists - more mailing lists