]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/nfs/file.c
nfs_write_end(): fix handling of short copies
[mirror_ubuntu-bionic-kernel.git] / fs / nfs / file.c
index 9ea85ae23c320b2dcb7409c97c3da3fa93a4fc12..a1de8ef63e56992c6e7eeb554c00dfc024111f94 100644 (file)
@@ -374,7 +374,7 @@ static int nfs_write_end(struct file *file, struct address_space *mapping,
         */
        if (!PageUptodate(page)) {
                unsigned pglen = nfs_page_length(page);
-               unsigned end = offset + len;
+               unsigned end = offset + copied;
 
                if (pglen == 0) {
                        zero_user_segments(page, 0, offset,