diff options
| author | Hou Pengyang <houpengyang@huawei.com> | 2017-04-25 12:45:12 +0000 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:43:05 +0200 |
| commit | 50ca0b2102b01e5c38ea734fbe4acf54e87eef2d (patch) | |
| tree | af9e7e40d0bdd435417b223a288c00327ab7946a /fs/f2fs/file.c | |
| parent | 8d692f39be2d6c1fd98b1d9f96f6bd364c826d11 (diff) | |
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/file.c')
| -rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 90c47e560..c67ceb563 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1930,7 +1930,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi, int err; /* if in-place-update policy is enabled, don't waste time here */ - if (need_inplace_update(inode, NULL)) + if (need_inplace_update_policy(inode, NULL)) return -EINVAL; pg_start = range->start >> PAGE_SHIFT; @@ -2065,7 +2065,7 @@ static int f2fs_ioc_defragment(struct file *filp, unsigned long arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; - if (!S_ISREG(inode->i_mode)) + if (!S_ISREG(inode->i_mode) || f2fs_is_atomic_file(inode)) return -EINVAL; if (f2fs_readonly(sbi->sb)) |
