dlmfs_file_write(): fix the bogosity in handling non-zero *ppos
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Apr 2020 17:45:27 +0000 (13:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2020 06:15:09 +0000 (08:15 +0200)
commit16cc37b3dc1732a28a9388fe70fbe36de12b6ff4
tree6d876676fcbae7efd2c2306352e0d94b54073cbe
parent5049385407b4eff07a97632ca3fdc0c6049928f2
dlmfs_file_write(): fix the bogosity in handling non-zero *ppos

commit 3815f1be546e752327b5868af103ccdddcc4db77 upstream.

'count' is how much you want written, not the final position.
Moreover, it can legitimately be less than the current position...

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ocfs2/dlmfs/dlmfs.c