convert s390 page handling macros to functions.
Subsystems (2)
PATCH 2/2 convert s390 page handling macros to functions.
From: Heiko Carstens <[email protected]>
[patch 2/2] 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.
Cc Martin Schwidefsky <[email protected]>
Signed-off-by Heiko Carstens <[email protected]>
---
include/asm-s390/pgtable.h | 85 +++++++++++++++++++++------------------------ include/linux/page-flags.h | 11 ++--- 2 files changed, 46 insertions(+), 50 deletions(-)
include/linux/page-flags.h +5 -6
@@ -123,12 +123,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
include/asm-s390/pgtable.h +41 -44
110 lines not on this page · raw message