mm: convert mm_counter_file() to take a folio
[linux-2.6-microblaze.git] / mm / khugepaged.c
index 2b219ac..fe43fbc 100644 (file)
@@ -1634,7 +1634,7 @@ int collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr,
        /* step 3: set proper refcount and mm_counters. */
        if (nr_ptes) {
                folio_ref_sub(folio, nr_ptes);
-               add_mm_counter(mm, mm_counter_file(&folio->page), -nr_ptes);
+               add_mm_counter(mm, mm_counter_file(folio), -nr_ptes);
        }
 
        /* step 4: remove empty page table */
@@ -1665,7 +1665,7 @@ abort:
        if (nr_ptes) {
                flush_tlb_mm(mm);
                folio_ref_sub(folio, nr_ptes);
-               add_mm_counter(mm, mm_counter_file(&folio->page), -nr_ptes);
+               add_mm_counter(mm, mm_counter_file(folio), -nr_ptes);
        }
        if (start_pte)
                pte_unmap_unlock(start_pte, ptl);