summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <shijie8@gmail.com>2009-12-14 17:59:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 08:53:22 -0800
commitf096e59e844ba3c5d5a7b54b3deafd2aeeebf921 (patch)
tree8d48bf8456ba98a1f9fe372b7550b2996162da3b
parentc9d0bf241451a3ab7d02e1652c22b80cd7d93e8f (diff)
downloadop-kernel-dev-f096e59e844ba3c5d5a7b54b3deafd2aeeebf921.zip
op-kernel-dev-f096e59e844ba3c5d5a7b54b3deafd2aeeebf921.tar.gz
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>
-rw-r--r--include/linux/mm.h5
1 files changed, 1 insertions, 4 deletions
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;
}
OpenPOWER on IntegriCloud