summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorYunlei He <heyunlei@huawei.com>2016-09-18 08:16:56 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-09-22 11:43:08 -0700
commit5d4c0af41fd4cc26cb75af4f3de7fb63c91209c1 (patch)
tree70e7c5105a9791897f2ba94e0e2264130405df02 /fs/f2fs/data.c
parent5bc994a043470c3ee544edaefbf93406d00f8de7 (diff)
downloadlinux-5d4c0af41fd4cc26cb75af4f3de7fb63c91209c1.tar.bz2
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/data.c')
-rw-r--r--fs/f2fs/data.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 25e3c302b72f..637b81d0f9f0 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -639,9 +639,6 @@ ssize_t f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from)
map.m_next_pgofs = NULL;
- if (f2fs_encrypted_inode(inode))
- return 0;
-
if (iocb->ki_flags & IOCB_DIRECT) {
ret = f2fs_convert_inline_inode(inode);
if (ret)
@@ -1532,8 +1529,7 @@ static int prepare_write_begin(struct f2fs_sb_info *sbi,
* we already allocated all the blocks, so we don't need to get
* the block addresses when there is no need to fill the page.
*/
- if (!f2fs_has_inline_data(inode) && !f2fs_encrypted_inode(inode) &&
- len == PAGE_SIZE)
+ if (!f2fs_has_inline_data(inode) && len == PAGE_SIZE)
return 0;
if (f2fs_has_inline_data(inode) ||