diff options
-rw-r--r-- | include/linux/mm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 24659ed06bae..4f3c1b2f44de 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -605,9 +605,12 @@ static inline struct address_space *page_mapping(struct page *page) | |||
605 | struct address_space *mapping = page->mapping; | 605 | struct address_space *mapping = page->mapping; |
606 | 606 | ||
607 | VM_BUG_ON(PageSlab(page)); | 607 | VM_BUG_ON(PageSlab(page)); |
608 | #ifdef CONFIG_SWAP | ||
608 | if (unlikely(PageSwapCache(page))) | 609 | if (unlikely(PageSwapCache(page))) |
609 | mapping = &swapper_space; | 610 | mapping = &swapper_space; |
610 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) | 611 | else |
612 | #endif | ||
613 | if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) | ||
611 | mapping = NULL; | 614 | mapping = NULL; |
612 | return mapping; | 615 | return mapping; |
613 | } | 616 | } |