mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
d1807793e1
commit
2dcea57ae1
3 changed files with 46 additions and 51 deletions
|
@ -128,12 +128,11 @@
|
|||
|
||||
#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags)
|
||||
#ifdef CONFIG_S390
|
||||
#define SetPageUptodate(_page) \
|
||||
do { \
|
||||
struct page *__page = (_page); \
|
||||
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
|
||||
page_test_and_clear_dirty(_page); \
|
||||
} while (0)
|
||||
static inline void SetPageUptodate(struct page *page)
|
||||
{
|
||||
if (!test_and_set_bit(PG_uptodate, &page->flags))
|
||||
page_test_and_clear_dirty(page);
|
||||
}
|
||||
#else
|
||||
#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue