aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-28 05:12:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:22 -0400
commitec7cade8c1a3d1ace69b35cc843b181818578dce (patch)
tree32ab77ff6b58cb55834e729fa020eb91ef9940f0 /include/linux
parent602c4d112f9abf43af4b882b4a6f5505ed5c51b7 (diff)
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')
-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 17deafa9eb9..d16efa9066d 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) \
134#define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \ 134#define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \
135 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) 135 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname)
136 136
137#define PAGEFLAG_FALSE(uname) \
138static inline int Page##uname(struct page *page) \
139 { return 0; }
140
137#define TESTSCFLAG(uname, lname) \ 141#define TESTSCFLAG(uname, lname) \
138 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname) 142 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname)
139 143
@@ -171,28 +175,19 @@ PAGEFLAG(Readahead, reclaim) /* Reminder to do async read-ahead */
171 */ 175 */
172#define PageHighMem(__p) is_highmem(page_zone(__p)) 176#define PageHighMem(__p) is_highmem(page_zone(__p))
173#else 177#else
174static inline int PageHighMem(struct page *page) 178PAGEFLAG_FALSE(HighMem)
175{
176 return 0;
177}
178#endif 179#endif
179 180
180#ifdef CONFIG_SWAP 181#ifdef CONFIG_SWAP
181PAGEFLAG(SwapCache, swapcache) 182PAGEFLAG(SwapCache, swapcache)
182#else 183#else
183static inline int PageSwapCache(struct page *page) 184PAGEFLAG_FALSE(SwapCache)
184{
185 return 0;
186}
187#endif 185#endif
188 186
189#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR 187#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
190PAGEFLAG(Uncached, uncached) 188PAGEFLAG(Uncached, uncached)
191#else 189#else
192static inline int PageUncached(struct page *) 190PAGEFLAG_FALSE(Uncached)
193{
194 return 0;
195}
196#endif 191#endif
197 192
198static inline int PageUptodate(struct page *page) 193static inline int PageUptodate(struct page *page)