]> git.baikalelectronics.ru Git - kernel.git/commit
9p: saner ->write_end() on failing copy into non-uptodate page
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 30 Aug 2016 00:56:35 +0000 (20:56 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 10 Dec 2016 19:25:18 +0000 (14:25 -0500)
commitfb9086c14407bfe4dfebde6b1e52af0bfcbea246
tree56f89cbfd95a55f5d750710d9ca950bf8992fdf1
parentb5e718e6c59a62bbcfe71d7de0e75d4ca1562b8a
9p: saner ->write_end() on failing copy into non-uptodate page

If we had a short copy into an uptodate page, there's no reason
whatsoever to zero anything; OTOH, if that page had _not_ been
uptodate, we must have been trying to overwrite it completely
and got a short copy.  In that case, overwriting the end with
zeroes, marking uptodate and sending to server is just plain
wrong.  Just unlock, keep it non-uptodate and return 0.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/9p/vfs_addr.c