mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
swap: clean-up #ifdef in page_mapping()
PageSwapCache() is always false when !CONFIG_SWAP, so compiler properly discard related code. Therefore, we don't need #ifdef explicitly. Signed-off-by: Joonsoo Kim <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
bc4b4448db
commit
d2cf5ad631
2 changed files with 2 additions and 4 deletions
|
|
@ -388,15 +388,12 @@ struct address_space *page_mapping(struct page *page)
|
|||
struct address_space *mapping = page->mapping;
|
||||
|
||||
VM_BUG_ON(PageSlab(page));
|
||||
#ifdef CONFIG_SWAP
|
||||
if (unlikely(PageSwapCache(page))) {
|
||||
swp_entry_t entry;
|
||||
|
||||
entry.val = page_private(page);
|
||||
mapping = swap_address_space(entry);
|
||||
} else
|
||||
#endif
|
||||
if ((unsigned long)mapping & PAGE_MAPPING_ANON)
|
||||
} else if ((unsigned long)mapping & PAGE_MAPPING_ANON)
|
||||
mapping = NULL;
|
||||
return mapping;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue