dect
/
linux-2.6
Archived
13
0
Fork 0

include/linux/mm.h: remove unneeded ifdef

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 <shijie8@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Huang Shijie 2009-12-14 17:59:51 -08:00 committed by Linus Torvalds
parent c9d0bf2414
commit f096e59e84
1 changed files with 1 additions and 4 deletions

View File

@ -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;
}