diff --git a/include/linux/mm.h b/include/linux/mm.h index 4c482a3ee87075c4078f89a470abc53e81c206d1..a5c451816fdca003350570aa3139e2f32fbe45f9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -599,6 +599,7 @@ static inline struct address_space *page_mapping(struct page *page) { struct address_space *mapping = page->mapping; + VM_BUG_ON(PageSlab(page)); if (unlikely(PageSwapCache(page))) mapping = &swapper_space; #ifdef CONFIG_SLUB