Skip to contentSkip to conversation

ceph: fix buffer pointer advance in ceph_sync_write

PATCH In review Henry C Chang 2 participants 2 messages Mar 19, 2013 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/ceph/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/file.c +1 -1
index e51558f..4bcbcb6 100644
@@ -608,7 +608,7 @@ out:
 		pos += len;
 		written += len;
 		left -= len;
-		data += written;
+		data += len;
 		if (left)
 			goto more;
 
Signature · 1 line
1.7.9.5
#1 lore raw

Sage beat me to it and merged this in last night. Thanks much! -Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 29 lines · Henry C Chang

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.

---
fs/ceph/file.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/file.c +1 -1
index e51558f..4bcbcb6 100644
@@ -608,7 +608,7 @@ out:
 pos += len;
 written += len;
 left -= len;
- data += written;
+ data += len;
 if (left)
 goto more;
 
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html