mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
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: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
cfc4d971df
commit
cb5c94cf3a
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user