diff options
author | Hou Pengyang <houpengyang@huawei.com> | 2017-04-25 15:45:12 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-05-03 07:19:46 +0300 |
commit | 7eab0c0df8d1a8c460f7d660d3ffd06fd448e590 (patch) | |
tree | 96e9f482c075dd71300254c8bcd9ff8e311989af /fs/f2fs/segment.h | |
parent | 63a94fa1d79dfbb94a2c923f8810e3b45b27570e (diff) | |
download | linux-7eab0c0df8d1a8c460f7d660d3ffd06fd448e590.tar.xz |
f2fs: reconstruct code to write a data page
This patch introduces encrypt_one_page which encrypts one data page before
submit_bio, and change the use of need_inplace_update.
Signed-off-by: Hou Pengyang <houpengyang@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 8ad22b8cbba7..10bf05d4cff4 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -564,16 +564,12 @@ enum { F2FS_IPU_ASYNC, }; -static inline bool need_inplace_update(struct inode *inode, +static inline bool need_inplace_update_policy(struct inode *inode, struct f2fs_io_info *fio) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); unsigned int policy = SM_I(sbi)->ipu_policy; - /* IPU can be done only for the user data */ - if (S_ISDIR(inode->i_mode) || f2fs_is_atomic_file(inode)) - return false; - if (test_opt(sbi, LFS)) return false; |