Merge tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / mm / page_io.c
index ae2b49055e435713d75bed34cf1c58168925aa45..46c603dddf043d4b5c0380996d3a5fb842d73315 100644 (file)
@@ -189,7 +189,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc)
         * Arch code may have to preserve more data than just the page
         * contents, e.g. memory tags.
         */
-       ret = arch_prepare_to_swap(&folio->page);
+       ret = arch_prepare_to_swap(folio);
        if (ret) {
                folio_mark_dirty(folio);
                folio_unlock(folio);
@@ -217,6 +217,7 @@ static inline void count_swpout_vm_event(struct folio *folio)
                count_memcg_folio_events(folio, THP_SWPOUT, 1);
                count_vm_event(THP_SWPOUT);
        }
+       count_mthp_stat(folio_order(folio), MTHP_STAT_ANON_SWPOUT);
 #endif
        count_vm_events(PSWPOUT, folio_nr_pages(folio));
 }