afs: afs_linux_write_end only commit copied 09/12409/2
authorYadav Yadavendra <yadayada@in.ibm.com>
Mon, 3 Oct 2016 19:25:08 +0000 (15:25 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 5 Oct 2016 14:04:05 +0000 (10:04 -0400)
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 <jaltman@auristor.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/afs/LINUX/osi_vnodeops.c

index db3efab..e282ec3 100644 (file)
@@ -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);