From: Chao Yu Date: Wed, 23 Aug 2017 10:23:25 +0000 (+0800) Subject: f2fs: trigger fdatasync for non-atomic_write file X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=774e1b78a0f90a7e81f7a23d9ebfa8b8233c1ffa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: trigger fdatasync for non-atomic_write file Sqlite only cares about synchronization of file data instead of other data unrelated attribute of inode, so in commit flow, call fdatasync is enough. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d74f1a9104a3..63e394907808 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1683,7 +1683,7 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp) stat_dec_atomic_write(inode); } } else { - ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, false); + ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 1, false); } err_out: inode_unlock(inode);