]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
hugetlb: Remove uses of folio_mapcount_ptr
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 30 Dec 2022 20:22:11 +0000 (15:22 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 3 Jan 2023 04:00:55 +0000 (23:00 -0500)
Use the entire_mapcount field directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/hugetlb.c

index 55e744abb9626b3494d27530a3d3650969282fe6..0a6bb471c1a747a3f747b251b8383a0613cae136 100644 (file)
@@ -1478,7 +1478,7 @@ static void __destroy_compound_gigantic_folio(struct folio *folio,
        int nr_pages = 1 << order;
        struct page *p;
 
-       atomic_set(folio_mapcount_ptr(folio), 0);
+       atomic_set(&folio->_entire_mapcount, 0);
        atomic_set(&folio->_nr_pages_mapped, 0);
        atomic_set(&folio->_pincount, 0);
 
@@ -2000,7 +2000,7 @@ static bool __prep_compound_gigantic_folio(struct folio *folio,
                if (i != 0)
                        set_compound_head(p, &folio->page);
        }
-       atomic_set(folio_mapcount_ptr(folio), -1);
+       atomic_set(&folio->_entire_mapcount, -1);
        atomic_set(&folio->_nr_pages_mapped, 0);
        atomic_set(&folio->_pincount, 0);
        return true;