OSDN Git Service

mm: fix crash when using XFS on loopback
[uclinux-h8/linux.git] / mm / util.c
index f7bc209..808f375 100644 (file)
--- 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;