ceph: fix buffer pointer advance in ceph_sync_write
authorHenry C Chang <[email protected]>
Tue, 19 Mar 2013 01:46:26 +0000 (09:46 +0800)
committerSage Weil <[email protected]>
Thu, 2 May 2013 04:17:08 +0000 (21:17 -0700)
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 <[email protected]>
Reviewed-by: Greg Farnum <[email protected]>
Tested-by: Sage Weil <[email protected]>
fs/ceph/file.c

index 0ac6e159bdc691e3b2a2c4908e34fa2a72e39ca3..aeafa67bfe99415721979263068b39c35059648e 100644 (file)
@@ -611,7 +611,7 @@ out:
                pos += len;
                written += len;
                left -= len;
-               data += written;
+               data += len;
                if (left)
                        goto more;