Why S390 SetPageUptodate() unconditionally clears page dirty state?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On S390, the SetPageUptodate() clears the page dirty state, if page was not
PG_uptodate before. This seems to mark dirty pages read back from swap to be
marked as clean. Shouldn't page_clear_dirty() be called, only if page is not
flagged as dirty?

Thanks
Nikanth

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6fa3178..d84699e 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -309,7 +309,7 @@ static inline void __SetPageUptodate(struct page *page)
 static inline void SetPageUptodate(struct page *page)
 {
 #ifdef CONFIG_S390
-	if (!test_and_set_bit(PG_uptodate, &page->flags))
+	if (!test_and_set_bit(PG_uptodate, &page->flags) && !PageDirty(page))
 		page_clear_dirty(page);
 #else
 	/*
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux