diff options
-rw-r--r-- | mm/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/util.c b/mm/util.c index f7bc2096071..808f375648e 100644 --- a/mm/util.c +++ b/mm/util.c @@ -390,7 +390,10 @@ struct address_space *page_mapping(struct page *page) { struct address_space *mapping = page->mapping; - VM_BUG_ON(PageSlab(page)); + /* This happens if someone calls flush_dcache_page on slab page */ + if (unlikely(PageSlab(page))) + return NULL; + if (unlikely(PageSwapCache(page))) { swp_entry_t entry; |