Skip to content

Commit 1b56e98

Browse files
author
Al Viro
committed
ocfs2 syncs the wrong range...
Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0414855 commit 1b56e98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/ocfs2/file.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,8 +2393,8 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
23932393

23942394
if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) ||
23952395
((file->f_flags & O_DIRECT) && !direct_io)) {
2396-
ret = filemap_fdatawrite_range(file->f_mapping, pos,
2397-
pos + count - 1);
2396+
ret = filemap_fdatawrite_range(file->f_mapping, *ppos,
2397+
*ppos + count - 1);
23982398
if (ret < 0)
23992399
written = ret;
24002400

@@ -2407,8 +2407,8 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
24072407
}
24082408

24092409
if (!ret)
2410-
ret = filemap_fdatawait_range(file->f_mapping, pos,
2411-
pos + count - 1);
2410+
ret = filemap_fdatawait_range(file->f_mapping, *ppos,
2411+
*ppos + count - 1);
24122412
}
24132413

24142414
/*

0 commit comments

Comments
 (0)