diff --git a/include/linux/mm.h b/include/linux/mm.h index 2b97be1147ecf640dcfa9f7d1707d17a3a1738ef..65d18a45b8e8452c646c55ad32b6c40a71c31457 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -475,8 +475,7 @@ static inline atomic_t *compound_mapcount_ptr(struct page *page) static inline int compound_mapcount(struct page *page) { - if (!PageCompound(page)) - return 0; + VM_BUG_ON_PAGE(!PageCompound(page), page); page = compound_head(page); return atomic_read(compound_mapcount_ptr(page)) + 1; }