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.8.0_pre1^2~39 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1cd86de2912af9ad709d2d7cf8aa35d5d28fb6b3;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. Change-Id: I3576a28302d35917019d369adc9d1013ad5870c5 Reviewed-on: https://gerrit.openafs.org/12409 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index db3efab08..e282ec3a3 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -2940,7 +2940,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);