Skip to contentSkip to conversation

f2fs: clear page uptodate when dropping cache for atomic write

PATCH New Chao Yu 1 participant 1 message Nov 13, 2015 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs: clear page uptodate when dropping cache for atomic write

We should clear uptodate flag for all pages atomic written when we drop them, otherwise before these cached pages were reclaimed or invalidated eventually, we will see invalid data when hitting them again.

---
 fs/f2fs/segment.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/segment.c +1 -0
index f77b325..23759fb 100644
@@ -257,6 +257,7 @@ int commit_inmem_pages(struct inode *inode, bool abort)
 				submit_bio = true;
 			}
 		} else {
+			ClearPageUptodate(cur->page);
 			trace_f2fs_commit_inmem_page(cur->page, INMEM_DROP);
 		}
 		set_page_private(cur->page, 0);
Signature · 1 line
2.6.3