From: Yadav Yadavendra Date: Mon, 3 Oct 2016 19:25:08 +0000 (-0400) Subject: afs: afs_linux_write_end only commit copied X-Git-Tag: upstream/1.6.20^2~10 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ac17fef207a9efd88757a5ac481827a0479aba84;p=packages%2Fo%2Fopenafs.git afs: afs_linux_write_end only commit copied In afs_linux_write_end() only commit the number of bytes actually copied to the page. Reviewed-on: https://gerrit.openafs.org/12409 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 1cd86de2912af9ad709d2d7cf8aa35d5d28fb6b3) Change-Id: I281078577cf3d90c1e052dacad9076cffe68586f Reviewed-on: https://gerrit.openafs.org/12413 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 86a966817..ce89ebfb2 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -2957,7 +2957,7 @@ afs_linux_write_end(struct file *file, struct address_space *mapping, int code; unsigned int from = pos & (PAGE_SIZE - 1); - code = afs_linux_commit_write(file, page, from, from + len); + code = afs_linux_commit_write(file, page, from, from + copied); unlock_page(page); put_page(page);