aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mm.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 1202cd3121e1..52b264563cd9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -643,12 +643,9 @@ static inline struct address_space *page_mapping(struct page *page)
643 struct address_space *mapping = page->mapping; 643 struct address_space *mapping = page->mapping;
644 644
645 VM_BUG_ON(PageSlab(page)); 645 VM_BUG_ON(PageSlab(page));
646#ifdef CONFIG_SWAP
647 if (unlikely(PageSwapCache(page))) 646 if (unlikely(PageSwapCache(page)))
648 mapping = &swapper_space; 647 mapping = &swapper_space;
649 else 648 else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
650#endif
651 if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
652 mapping = NULL; 649 mapping = NULL;
653 return mapping; 650 return mapping;
654} 651}