[PATCH v1] mm/memory-failure: replace magic number 3 with GET_PAGE_MAX_RETRY_NUM
From: wangxuewen
Date: Thu Apr 02 2026 - 02:51:22 EST
From: wangxuewen <wangxuewen@xxxxxxxxxx>
Replace the hardcoded magic number 3 in get_any_page() with the
existing GET_PAGE_MAX_RETRY_NUM macro for code consistency and
maintainability.
This change has no functional impact, only improves code readability
and unifies the retry limit configuration.
Signed-off-by: wangxuewen <wangxuewen@xxxxxxxxxx>
---
mm/memory-failure.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ee42d4361309..e5a6b1353d9e 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1418,7 +1418,7 @@ static int get_any_page(struct page *p, unsigned long flags)
* We raced with (possibly temporary) unhandlable
* page, retry.
*/
- if (pass++ < 3) {
+ if (pass++ < GET_PAGE_MAX_RETRY_NUM) {
shake_page(p);
goto try_again;
}
--
2.25.1