From ac17fef207a9efd88757a5ac481827a0479aba84 Mon Sep 17 00:00:00 2001 From: Yadav Yadavendra Date: Mon, 3 Oct 2016 15:25:08 -0400 Subject: [PATCH] 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 --- src/afs/LINUX/osi_vnodeops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5