Commit 022f3e2e authored by Henry C Chang's avatar Henry C Chang Committed by Sage Weil

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: default avatarHenry C Chang <henry.cy.chang@gmail.com>
Reviewed-by: default avatarGreg Farnum <greg@inktank.com>
Tested-by: default avatarSage Weil <sage@inktank.com>
parent 2f276c51
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment