]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afs: afs_linux_write_end only commit copied
authorYadav Yadavendra <yadayada@in.ibm.com>
Mon, 3 Oct 2016 19:25:08 +0000 (15:25 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 19 Oct 2016 13:22:54 +0000 (09:22 -0400)
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 <jaltman@auristor.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 1cd86de2912af9ad709d2d7cf8aa35d5d28fb6b3)

Change-Id: I281078577cf3d90c1e052dacad9076cffe68586f
Reviewed-on: https://gerrit.openafs.org/12413
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_vnodeops.c

index 86a9668178b17806ba04f64af9ceae7e49dc3603..ce89ebfb2c6f5cc328cb27cf57b70b13067344ee 100644 (file)
@@ -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);