diff options
author | Yunlei He <heyunlei@huawei.com> | 2016-09-18 08:16:56 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-22 11:43:08 -0700 |
commit | 5d4c0af41fd4cc26cb75af4f3de7fb63c91209c1 (patch) | |
tree | 70e7c5105a9791897f2ba94e0e2264130405df02 /fs/f2fs/segment.c | |
parent | 5bc994a043470c3ee544edaefbf93406d00f8de7 (diff) |
f2fs: preallocate blocks for encrypted file
This patch allow preallocates data blocks for buffered aio writes
in encrypted file.
Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: fix to avoid BUG_ON]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 101b58f1d636..c4d0472cf47d 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1675,11 +1675,9 @@ void f2fs_wait_on_encrypted_page_writeback(struct f2fs_sb_info *sbi, { struct page *cpage; - if (blkaddr == NEW_ADDR) + if (blkaddr == NEW_ADDR || blkaddr == NULL_ADDR) return; - f2fs_bug_on(sbi, blkaddr == NULL_ADDR); - cpage = find_lock_page(META_MAPPING(sbi), blkaddr); if (cpage) { f2fs_wait_on_page_writeback(cpage, DATA, true); |