diff options
-rw-r--r-- | include/linux/mm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8dd4fde9d2e5..c6bf813a6b3d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -484,7 +484,8 @@ static inline void page_mapcount_reset(struct page *page) | |||
484 | 484 | ||
485 | static inline int page_mapcount(struct page *page) | 485 | static inline int page_mapcount(struct page *page) |
486 | { | 486 | { |
487 | return atomic_read(&(page)->_mapcount) + 1; | 487 | VM_BUG_ON_PAGE(PageSlab(page), page); |
488 | return atomic_read(&page->_mapcount) + 1; | ||
488 | } | 489 | } |
489 | 490 | ||
490 | static inline int page_count(struct page *page) | 491 | static inline int page_count(struct page *page) |