Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1268803 > unrolled thread

[PATCH] f2fs: clear page uptodate when dropping cache for atomic write

Started byChao Yu <chao2.yu@samsung.com>
First post2015-11-13 11:30 +0100
Last post2015-11-13 11:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] f2fs: clear page uptodate when dropping cache for atomic write Chao Yu <chao2.yu@samsung.com> - 2015-11-13 11:30 +0100

#1268803 — [PATCH] f2fs: clear page uptodate when dropping cache for atomic write

FromChao Yu <chao2.yu@samsung.com>
Date2015-11-13 11:30 +0100
Subject[PATCH] f2fs: clear page uptodate when dropping cache for atomic write
Message-ID<qujMf-5a8-39@gated-at.bofh.it>
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web