|
@@ -475,8 +475,7 @@ static inline atomic_t *compound_mapcount_ptr(struct page *page)
|
|
|
|
|
|
static inline int compound_mapcount(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);
|
|
page = compound_head(page);
|
|
return atomic_read(compound_mapcount_ptr(page)) + 1;
|
|
return atomic_read(compound_mapcount_ptr(page)) + 1;
|
|
}
|
|
}
|