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,9 +654,11 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
__pte; \
})
#define arch_set_page_uptodate(__page) \
#define SetPageUptodate(_page) \
do { \
asm volatile ("sske %0,%1" : : "d" (0), \
struct page *__page = (_page); \
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
asm volatile ("sske %0,%1" : : "d" (0), \
"a" (__pa((__page-mem_map) << PAGE_SHIFT)));\
} while (0)
......
......@@ -194,16 +194,10 @@ extern unsigned long __read_page_state(unsigned offset);
#define ClearPageReferenced(page) 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 SetPageUptodate(page) \
do { \
arch_set_page_uptodate(page); \
set_bit(PG_uptodate, &(page)->flags); \
} while (0)
#ifndef SetPageUptodate
#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
#endif
#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(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