nfs_write_end(): fix handling of short copies
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 6 Sep 2016 01:42:32 +0000 (21:42 -0400)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:17:04 +0000 (13:17 +0000)
commit26eb3c7ccfabf3642c7af149a29bf5b4d0600ac8
treed25b9f961b51fd22a3ce606aaa5a9876fcf0e6a7
parent627f8bb12926face21de795ef38da9f6f967566d
nfs_write_end(): fix handling of short copies

commit c0cf3ef5e0f47e385920450b245d22bead93e7ad upstream.

What matters when deciding if we should make a page uptodate is
not how much we _wanted_ to copy, but how much we actually have
copied.  As it is, on architectures that do not zero tail on
short copy we can leave uninitialized data in page marked uptodate.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/nfs/file.c