diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-05-18 12:00:06 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-06-02 01:21:00 +0200 |
commit | cb5c94cf3a825a0b64ae84516e7dd5c8a59befe6 (patch) | |
tree | b1840f3fb0e95caa616cf801c6518f9e68c5f482 /fs/f2fs | |
parent | f2fs crypto: split f2fs_crypto_init/exit with two parts (diff) | |
download | linux-cb5c94cf3a825a0b64ae84516e7dd5c8a59befe6.tar.xz linux-cb5c94cf3a825a0b64ae84516e7dd5c8a59befe6.zip |
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index e0821d2c39e4..7254c11344be 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -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); } |