提交 0adf6a1b 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

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: 608514de ("f2fs: set fsync mark only for the last dnode")
Signed-off-by: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 84a23fbe
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册