diff --git a/include/linux/mm.h b/include/linux/mm.h index 8dd4fde9d2e5324c2c55e614d7b07f93848d2dd5..c6bf813a6b3d732e698d26dcedae4026c97940c8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -484,7 +484,8 @@ static inline void page_mapcount_reset(struct page *page) static inline int page_mapcount(struct page *page) { - return atomic_read(&(page)->_mapcount) + 1; + VM_BUG_ON_PAGE(PageSlab(page), page); + return atomic_read(&page->_mapcount) + 1; } static inline int page_count(struct page *page)