diff --git a/include/linux/mm.h b/include/linux/mm.h index dd7d6e95e43b..d5f0f2cfd552 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -891,6 +891,11 @@ static inline void destroy_compound_page(struct page *page) compound_page_dtors[page[1].compound_dtor](page); } +static inline atomic_t *folio_pincount_ptr(struct folio *folio) +{ + return &folio_page(folio, 1)->compound_pincount; +} + static inline int head_compound_pincount(struct page *head) { return atomic_read(compound_pincount_ptr(head));