summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-04-26 17:05:50 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-05-31 11:31:49 -0700
commitb4c3ca8ba9a447ea5d1b3dd1082f112c8dda3562 (patch)
tree73309edfcc8c5e7ccb460dc5faefb1cc3b4a679e /fs/f2fs/file.c
parentaf8ff65bb85df39159944811a241f0dd827f0d76 (diff)
downloadlinux-b4c3ca8ba9a447ea5d1b3dd1082f112c8dda3562.tar.bz2
f2fs: treat volatile file's data as hot one
Volatile file's data will be updated oftenly, so it'd better to place its data into hot data segment. In addition, for atomic file, we change to check FI_ATOMIC_FILE instead of FI_HOT_DATA to make code readability better. 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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 8af352c3239d..26b32108b09b 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1696,7 +1696,6 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
if (ret)
goto out;
skip_flush:
- set_inode_flag(inode, FI_HOT_DATA);
set_inode_flag(inode, FI_ATOMIC_FILE);
f2fs_update_time(F2FS_I_SB(inode), REQ_TIME);
@@ -1739,7 +1738,6 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp)
ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, true);
if (!ret) {
clear_inode_flag(inode, FI_ATOMIC_FILE);
- clear_inode_flag(inode, FI_HOT_DATA);
stat_dec_atomic_write(inode);
}
} else {