From: Huang Shijie Date: Tue, 15 Dec 2009 01:59:51 +0000 (-0800) Subject: include/linux/mm.h: remove unneeded ifdef X-Git-Tag: v2.6.33-rc1~187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f096e59e844ba3c5d5a7b54b3deafd2aeeebf921;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mm.h b/include/linux/mm.h index 1202cd3..52b2645 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -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; }