提交 aa3caafe 编写于 作者: J Jan Kara

pohmelfs: Use new syncing helper

Use new generic_write_sync() helper instead of sync_page_range().
Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 af0f4414
...@@ -927,10 +927,10 @@ ssize_t pohmelfs_write(struct file *file, const char __user *buf, ...@@ -927,10 +927,10 @@ ssize_t pohmelfs_write(struct file *file, const char __user *buf,
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
WARN_ON(ret < 0); WARN_ON(ret < 0);
if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) { if (ret > 0) {
ssize_t err; ssize_t err;
err = sync_page_range(inode, mapping, pos, ret); err = generic_write_sync(file, pos, ret);
if (err < 0) if (err < 0)
ret = err; ret = err;
WARN_ON(ret < 0); WARN_ON(ret < 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册