Commit cb5c94cf authored by Chao Yu's avatar Chao Yu Committed by 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: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment