* [PATCH] f2fs: clear page uptodate when dropping cache for atomic write
@ 2015-11-13 10:27 Chao Yu
0 siblings, 0 replies; only message in thread
From: Chao Yu @ 2015-11-13 10:27 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel, linux-kernel
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.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
fs/f2fs/segment.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index f77b325..23759fb 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -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);
--
2.6.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-13 10:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-13 10:27 [PATCH] f2fs: clear page uptodate when dropping cache for atomic write Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox