On Mon, Feb 27, 2023 at 05:49:18PM -0500, John David Anglin wrote: > > @@ -104,13 +104,17 @@ __update_cache(pte_t pte) > > if (!pfn_valid(pfn)) > > return; > > - page = pfn_to_page(pfn); > > - if (page_mapping_file(page) && > > - test_bit(PG_dcache_dirty, &page->flags)) { > > - flush_kernel_dcache_page_addr(pfn_va(pfn)); > > - clear_bit(PG_dcache_dirty, &page->flags); > > + folio = page_folio(pfn_to_page(pfn)); > > + pfn = folio_pfn(folio); > > + nr = folio_nr_pages(folio); > > + if (folio_flush_mapping(folio) && > Shouldn't this call be to folio_mapping()? For pages in the swap cache, folio_mapping() will return the swap cache mapping, which isn't what we want. folio_file_mapping() will return the swap file mapping, which is also not what we want. folio_flush_mapping() returns NULL, which is what we want.