Commit 7553d794 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: lost dirty bits

The SetPageUptodate function is called for pages that are already up to
date.  The arch_set_page_uptodate function of s390 may not clear the dirty
bit in that case otherwise a dirty bit which is set between the start of an
i/o for a writeback and a following call to SetPageUptodate is lost.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent faf65276
...@@ -654,8 +654,10 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) ...@@ -654,8 +654,10 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
__pte; \ __pte; \
}) })
#define arch_set_page_uptodate(__page) \ #define SetPageUptodate(_page) \
do { \ do { \
struct page *__page = (_page); \
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
asm volatile ("sske %0,%1" : : "d" (0), \ asm volatile ("sske %0,%1" : : "d" (0), \
"a" (__pa((__page-mem_map) << PAGE_SHIFT)));\ "a" (__pa((__page-mem_map) << PAGE_SHIFT)));\
} while (0) } while (0)
......
...@@ -194,16 +194,10 @@ extern unsigned long __read_page_state(unsigned offset); ...@@ -194,16 +194,10 @@ extern unsigned long __read_page_state(unsigned offset);
#define ClearPageReferenced(page) clear_bit(PG_referenced, &(page)->flags) #define ClearPageReferenced(page) clear_bit(PG_referenced, &(page)->flags)
#define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags) #define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags)
#ifndef arch_set_page_uptodate
#define arch_set_page_uptodate(page) do { } while (0)
#endif
#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) #define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags)
#define SetPageUptodate(page) \ #ifndef SetPageUptodate
do { \ #define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
arch_set_page_uptodate(page); \ #endif
set_bit(PG_uptodate, &(page)->flags); \
} while (0)
#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags) #define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags)
#define PageDirty(page) test_bit(PG_dirty, &(page)->flags) #define PageDirty(page) test_bit(PG_dirty, &(page)->flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment