diff options
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -388,15 +388,12 @@ struct address_space *page_mapping(struct page *page) | |||
388 | struct address_space *mapping = page->mapping; | 388 | struct address_space *mapping = page->mapping; |
389 | 389 | ||
390 | VM_BUG_ON(PageSlab(page)); | 390 | VM_BUG_ON(PageSlab(page)); |
391 | #ifdef CONFIG_SWAP | ||
392 | if (unlikely(PageSwapCache(page))) { | 391 | if (unlikely(PageSwapCache(page))) { |
393 | swp_entry_t entry; | 392 | swp_entry_t entry; |
394 | 393 | ||
395 | entry.val = page_private(page); | 394 | entry.val = page_private(page); |
396 | mapping = swap_address_space(entry); | 395 | mapping = swap_address_space(entry); |
397 | } else | 396 | } else if ((unsigned long)mapping & PAGE_MAPPING_ANON) |
398 | #endif | ||
399 | if ((unsigned long)mapping & PAGE_MAPPING_ANON) | ||
400 | mapping = NULL; | 397 | mapping = NULL; |
401 | return mapping; | 398 | return mapping; |
402 | } | 399 | } |