Skip to content

Commit

Permalink
include/linux/mm.h: remove unneeded ifdef
Browse files Browse the repository at this point in the history
The check code for CONFIG_SWAP is redundant, because there is a
non-CONFIG_SWAP version for PageSwapCache() which just returns 0.

Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
zyzii authored and torvalds committed Dec 15, 2009
1 parent c9d0bf2 commit f096e59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,9 @@ static inline 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)))
mapping = &swapper_space;
else
#endif
if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
mapping = NULL;
return mapping;
}
Expand Down

0 comments on commit f096e59

Please sign in to comment.