Commit 0601ac88 authored by Kefeng Wang's avatar Kefeng Wang Committed by Andrew Morton

s390: use pfn_swap_entry_folio() in ptep_zap_swap_entry()

Call pfn_swap_entry_folio() in ptep_zap_swap_entry() as preparation for
converting mm counter functions to take a folio.

Link: https://lkml.kernel.org/r/20240111152429.3374566-5-willy@infradead.orgSigned-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f2d571b0
......@@ -721,9 +721,9 @@ static void ptep_zap_swap_entry(struct mm_struct *mm, swp_entry_t entry)
if (!non_swap_entry(entry))
dec_mm_counter(mm, MM_SWAPENTS);
else if (is_migration_entry(entry)) {
struct page *page = pfn_swap_entry_to_page(entry);
struct folio *folio = pfn_swap_entry_folio(entry);
dec_mm_counter(mm, mm_counter(page));
dec_mm_counter(mm, mm_counter(&folio->page));
}
free_swap_and_cache(entry);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment