diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-08-23 07:18:00 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-09-05 23:41:07 +0300 |
commit | 0ded69f632bb717be9aeea3ae74e29050fcb060c (patch) | |
tree | 2e163c4d4d623d41c061f5884fe405bd71c0b050 /fs/f2fs/file.c | |
parent | 22d7ea1364140eaafb272875ff40e95c85a75bdf (diff) | |
download | linux-0ded69f632bb717be9aeea3ae74e29050fcb060c.tar.xz |
f2fs: avoid wrong decrypted data from disk
1. Create a file in an encrypted directory
2. Do GC & drop caches
3. Read stale data before its bio for metapage was not issued yet
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ca66b3eb197a..e21a1923056d 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -112,8 +112,7 @@ mapped: f2fs_wait_on_page_writeback(page, DATA, false); /* wait for GCed page writeback via META_MAPPING */ - if (f2fs_post_read_required(inode)) - f2fs_wait_on_block_writeback(sbi, dn.data_blkaddr); + f2fs_wait_on_block_writeback(inode, dn.data_blkaddr); out_sem: up_read(&F2FS_I(inode)->i_mmap_sem); |