summaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-28 02:12:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:22 -0700
commitec7cade8c1a3d1ace69b35cc843b181818578dce (patch)
tree32ab77ff6b58cb55834e729fa020eb91ef9940f0 /include/linux/page-flags.h
parent602c4d112f9abf43af4b882b4a6f5505ed5c51b7 (diff)
downloadop-kernel-dev-ec7cade8c1a3d1ace69b35cc843b181818578dce.zip
op-kernel-dev-ec7cade8c1a3d1ace69b35cc843b181818578dce.tar.gz
page flags: add PAGEFLAGS_FALSE for flags that are always false
Turns out that there are a number of times that a flag is simply always returning 0. Define a macro for that. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 17deafa..d16efa9 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -134,6 +134,10 @@ static inline int TestClearPage##uname(struct page *page) \
#define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \
__SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname)
+#define PAGEFLAG_FALSE(uname) \
+static inline int Page##uname(struct page *page) \
+ { return 0; }
+
#define TESTSCFLAG(uname, lname) \
TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname)
@@ -171,28 +175,19 @@ PAGEFLAG(Readahead, reclaim) /* Reminder to do async read-ahead */
*/
#define PageHighMem(__p) is_highmem(page_zone(__p))
#else
-static inline int PageHighMem(struct page *page)
-{
- return 0;
-}
+PAGEFLAG_FALSE(HighMem)
#endif
#ifdef CONFIG_SWAP
PAGEFLAG(SwapCache, swapcache)
#else
-static inline int PageSwapCache(struct page *page)
-{
- return 0;
-}
+PAGEFLAG_FALSE(SwapCache)
#endif
#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
PAGEFLAG(Uncached, uncached)
#else
-static inline int PageUncached(struct page *)
-{
- return 0;
-}
+PAGEFLAG_FALSE(Uncached)
#endif
static inline int PageUptodate(struct page *page)
OpenPOWER on IntegriCloud