From: wangxuewen Date: Thu, 2 Apr 2026 06:49:46 +0000 (+0800) Subject: mm/memory-failure: replace magic number 3 with GET_PAGE_MAX_RETRY_NUM X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c70a9f639bfd662b95b5e3e64f4b62b13c237eca;p=thirdparty%2Fkernel%2Flinux.git mm/memory-failure: replace magic number 3 with GET_PAGE_MAX_RETRY_NUM 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. Link: https://lore.kernel.org/20260402064946.1124250-1-18810879172@163.com Signed-off-by: wangxuewen Acked-by: SeongJae Park Acked-by: Miaohe Lin Cc: Naoya Horiguchi Signed-off-by: Andrew Morton --- diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 62b547c168fc..866c4428ac7e 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1418,7 +1418,7 @@ try_again: * We raced with (possibly temporary) unhandlable * page, retry. */ - if (pass++ < 3) { + if (pass++ < GET_PAGE_MAX_RETRY_NUM) { shake_page(p); goto try_again; }