]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
hugetlb: remove uses of folio_mapcount_ptr
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 11 Jan 2023 14:28:59 +0000 (14:28 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:32:57 +0000 (22:32 -0800)
Use the entire_mapcount field directly.

Link: https://lkml.kernel.org/r/20230111142915.1001531-14-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c

index c9702224931ca988d243b51431ceed0d4cf7bed3..a68e0e597a8f1275bcf176152941f8d061de598d 100644 (file)
@@ -1474,7 +1474,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);
 
@@ -1996,7 +1996,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;