Browse Source

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>
Henry C Chang 12 years ago
parent
commit
022f3e2ee2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/ceph/file.c

+ 1 - 1
fs/ceph/file.c

@@ -611,7 +611,7 @@ out:
 		pos += len;
 		written += len;
 		left -= len;
-		data += written;
+		data += len;
 		if (left)
 			goto more;