提交 022f3e2e 编写于 作者: H Henry C Chang 提交者: 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: NHenry C Chang <henry.cy.chang@gmail.com>
Reviewed-by: NGreg Farnum <greg@inktank.com>
Tested-by: NSage Weil <sage@inktank.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册