提交 cb5c94cf 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

f2fs crypto: zero next free dnode block

Now page cache of meta inode is used by garbage collection for encrypted page,
it may contain random data, so we should zero it before issuing discard.
Signed-off-by: NChao Yu <chao2.yu@samsung.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 cfc4d971
......@@ -519,7 +519,7 @@ void discard_next_dnode(struct f2fs_sb_info *sbi, block_t blkaddr)
if (err) {
struct page *page = grab_meta_page(sbi, blkaddr);
/* zero-filled page */
memset(page_address(page), 0, F2FS_BLKSIZE);
set_page_dirty(page);
f2fs_put_page(page, 1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册