From: Chao Yu Date: Fri, 18 Aug 2017 08:20:33 +0000 (+0800) Subject: f2fs: trigger normal fsync for non-atomic_write file X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0adf6a1b796777f5d19a9b7442172016aeb8020a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: trigger normal fsync for non-atomic_write file If file was not opened with atomic write mode, but user uses atomic write ioctl to fsync datas, in the flow, we should not fsync that file with atomic write mode. Fixes: 608514deba38 ("f2fs: set fsync mark only for the last dnode") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 8f0d32a57b52..d74f1a9104a3 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, true); + ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, false); } err_out: inode_unlock(inode);