Commit efcb9185 authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman

ocfs2 syncs the wrong range...

commit 1b56e989 upstream.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7f76c83
......@@ -2389,8 +2389,8 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) ||
((file->f_flags & O_DIRECT) && !direct_io)) {
ret = filemap_fdatawrite_range(file->f_mapping, pos,
pos + count - 1);
ret = filemap_fdatawrite_range(file->f_mapping, *ppos,
*ppos + count - 1);
if (ret < 0)
written = ret;
......@@ -2403,8 +2403,8 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
}
if (!ret)
ret = filemap_fdatawait_range(file->f_mapping, pos,
pos + count - 1);
ret = filemap_fdatawait_range(file->f_mapping, *ppos,
*ppos + count - 1);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment