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>
This commit is contained in:
@@ -3195,10 +3195,14 @@ void f2fs_wait_on_page_writeback(struct page *page,
|
||||
}
|
||||
}
|
||||
|
||||
void f2fs_wait_on_block_writeback(struct f2fs_sb_info *sbi, block_t blkaddr)
|
||||
void f2fs_wait_on_block_writeback(struct inode *inode, block_t blkaddr)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
||||
struct page *cpage;
|
||||
|
||||
if (!f2fs_post_read_required(inode))
|
||||
return;
|
||||
|
||||
if (!is_valid_data_blkaddr(sbi, blkaddr))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user