]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: _really_ sync the right range
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 8 Apr 2015 21:00:32 +0000 (17:00 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 Apr 2015 11:18:48 +0000 (07:18 -0400)
commita8d0b0c7245412c9c9cde469ccd1e2eeb7fb356d
treea49bfdd4b0eb85b45ce8fd11ba72f6b0e6145a51
parent65c16b55873948112deb0c0566e8eeb0986a162b
ocfs2: _really_ sync the right range

"ocfs2 syncs the wrong range" had been broken; prior to it the
code was doing the wrong thing in case of O_APPEND, all right,
but _after_ it we were syncing the wrong range in 100% cases.
*ppos, aka iocb->ki_pos is incremented prior to that point,
so we are always doing sync on the area _after_ the one we'd
written to.

Spotted by Joseph Qi <joseph.qi@huawei.com> back in January;
unfortunately, I'd missed his mail back then ;-/

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ocfs2/file.c