aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-09-29 04:58:41 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:03 -0400
commit2dcea57ae19275451a756a2d5bf96b329487b0e0 (patch)
tree37b0def2369c106fdf3653ca85e0c1a34ce4d905 /include/linux/page-flags.h
parentd1807793e1e7e502e3dc047115e9dbc3b50e4534 (diff)
[PATCH] convert s390 page handling macros to functions
Convert s390 page handling macros to functions. In particular this fixes a problem with s390's SetPageUptodate macro which uses its input parameter twice which again can cause subtle bugs. [akpm@osdl.org: build fix] Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 9d7921dd50f0..4830a3bedfb2 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -128,12 +128,11 @@
128 128
129#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) 129#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags)
130#ifdef CONFIG_S390 130#ifdef CONFIG_S390
131#define SetPageUptodate(_page) \ 131static inline void SetPageUptodate(struct page *page)
132 do { \ 132{
133 struct page *__page = (_page); \ 133 if (!test_and_set_bit(PG_uptodate, &page->flags))
134 if (!test_and_set_bit(PG_uptodate, &__page->flags)) \ 134 page_test_and_clear_dirty(page);
135 page_test_and_clear_dirty(_page); \ 135}
136 } while (0)
137#else 136#else
138#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) 137#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
139#endif 138#endif