mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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 <wangxuewen@kylinos.cn> Acked-by: SeongJae Park <sj@kernel.org> Acked-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Naoya Horiguchi <nao.horiguchi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
d590df11be
commit
c70a9f639b
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user