Skip to content

Commit

Permalink
ceph: fix buffer pointer advance in ceph_sync_write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Henry C Chang authored and Sage Weil committed May 2, 2013
1 parent 2f276c5 commit 022f3e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
pos += len;
written += len;
left -= len;
data += written;
data += len;
if (left)
goto more;

Expand Down

0 comments on commit 022f3e2

Please sign in to comment.