Message ID | 20240412193510.2356957-11-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Some cleanups for memory-failure | expand |
On 2024/4/13 3:35, Matthew Wilcox (Oracle) wrote: > Saves a couple of calls to compound_head(). > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> > Reviewed-by: Jane Chu <jane.chu@oracle.com> Acked-by: Miaohe Lin <linmiaohe@huawei.com> Thanks. . > --- > mm/memory-failure.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index e42c5f2179dc..a9fa5901b48c 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -722,9 +722,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); >
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index e42c5f2179dc..a9fa5901b48c 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -722,9 +722,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);