diff mbox series

[1/6] mm, hwpoison: use ClearPageHWPoison() in memory_failure()

Message ID 20220830123604.25763-2-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series A few cleanup patches for memory-failure | expand

Commit Message

Miaohe Lin Aug. 30, 2022, 12:35 p.m. UTC
Use ClearPageHWPoison() instead of TestClearPageHWPoison() to clear page
hwpoison flags to avoid unneeded full memory barrier overhead.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/memory-failure.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

HORIGUCHI NAOYA(堀口 直也) Sept. 5, 2022, 5:23 a.m. UTC | #1
On Tue, Aug 30, 2022 at 08:35:59PM +0800, Miaohe Lin wrote:
> Use ClearPageHWPoison() instead of TestClearPageHWPoison() to clear page
> hwpoison flags to avoid unneeded full memory barrier overhead.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
diff mbox series

Patch

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ebf16d177ee5..a923a6dde871 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2128,7 +2128,7 @@  int memory_failure(unsigned long pfn, int flags)
 	page_flags = p->flags;
 
 	if (hwpoison_filter(p)) {
-		TestClearPageHWPoison(p);
+		ClearPageHWPoison(p);
 		unlock_page(p);
 		put_page(p);
 		res = -EOPNOTSUPP;