]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 22 Apr 2015 06:58:44 +0000 (08:58 +0200)
commit6b71b6af84eb77a0466a57b8ae617f0fdfc4c21f
treebe1fc22cd3f2ad4b5a58ccc3edce2a325e0b9736
parentb76a04136cc3403dfa844773e56b5d575ffa4841
ocfs2: _really_ sync the right range

commit 64b4e2526d1cf6e6a4db6213d6e2b6e6ab59479a upstream.

"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 ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/ocfs2/file.c