summaryrefslogtreecommitdiff
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorHenry C Chang <henry.cy.chang@gmail.com>2013-03-19 05:46:26 +0400
committerSage Weil <sage@inktank.com>2013-05-02 08:17:08 +0400
commit022f3e2ee2354599faccf5a764a5a24a5dd194c9 (patch)
tree02294b663ff124edee88f98ddcb32397c83ffe08 /fs/ceph/file.c
parent2f276c511137d97e56b19e29865e1e6569315ccb (diff)
downloadlinux-022f3e2ee2354599faccf5a764a5a24a5dd194c9.tar.xz
ceph: fix buffer pointer advance in ceph_sync_write
We should advance the user data pointer by _len_ instead of _written_. _len_ is the data length written in each iteration while _written_ is the accumulated data length we have writtent out. Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com> Reviewed-by: Greg Farnum <greg@inktank.com> Tested-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 0ac6e159bdc6..aeafa67bfe99 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -611,7 +611,7 @@ out:
pos += len;
written += len;
left -= len;
- data += written;
+ data += len;
if (left)
goto more;