diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-04-12 20:35:07 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-05-05 17:53:47 -0700 |
commit | 0edb5b282ac5a4f9b1bdc22120c9b145be315622 (patch) | |
tree | 79779914fab25046cc3bbcdb10304c0751ce7dae /mm/memory-failure.c | |
parent | ee299e9849736f60e6e01f7a5dcb258de7c7d1b9 (diff) |
mm/memory-failure: use folio functions throughout collect_procs()
Saves a couple of calls to compound_head().
Link: https://lkml.kernel.org/r/20240412193510.2356957-11-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 521e0efd08e7..498564f23abb 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -728,9 +728,9 @@ static void collect_procs(struct folio *folio, struct page *page, { if (!folio->mapping) return; - if (unlikely(PageKsm(page))) + if (unlikely(folio_test_ksm(folio))) collect_procs_ksm(page, tokill, force_early); - else if (PageAnon(page)) + else if (folio_test_anon(folio)) collect_procs_anon(folio, page, tokill, force_early); else collect_procs_file(folio, page, tokill, force_early); |