Message ID | 1391772205-22239-9-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 53eb728..23a80570 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -791,7 +791,10 @@ static inline 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))) mapping = &swapper_space; else if ((unsigned long)mapping & PAGE_MAPPING_ANON)