summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-15 15:42:11 +0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-15 15:42:11 +0700
commit2e67c56248b776c0a546925c796cdb167ee4d7a0 (patch)
tree1532ff3d2a452ed52b732fba9878846494e863e1 /mm
parent1a60864fc1c3b268a921549bcfc707c98083260b (diff)
parent74e72f894d56eb9d2e1218530c658e7d297e002b (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge patches from Andrew Morton: "Six fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: lib/percpu_counter.c: fix __percpu_counter_add() crash_dump: fix compilation error (on MIPS at least) mm: fix crash when using XFS on loopback MIPS: fix blast_icache32 on loongson2 MIPS: fix case mismatch in local_r4k_flush_icache_range() nilfs2: fix segctor bug that causes file system corruption
Diffstat (limited to 'mm')
-rw-r--r--mm/util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/util.c b/mm/util.c
index f7bc2096071c..808f375648e7 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;