From: Al Viro Date: Mon, 10 Feb 2014 20:18:55 +0000 (-0500) Subject: ocfs2 syncs the wrong range... X-Git-Tag: v3.13.7~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a4325ade228730389fe84518b527699715cdd0e;p=thirdparty%2Fkernel%2Fstable.git ocfs2 syncs the wrong range... commit 1b56e98990bcdbb20b9fab163654b9315bf158e8 upstream. Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 6fff128cad161..9c6594997323e 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2370,8 +2370,8 @@ out_dio: 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; @@ -2384,8 +2384,8 @@ out_dio: } if (!ret) - ret = filemap_fdatawait_range(file->f_mapping, pos, - pos + count - 1); + ret = filemap_fdatawait_range(file->f_mapping, *ppos, + *ppos + count - 1); } /*