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 <[email protected]>
Reviewed-by: Greg Farnum <[email protected]>
Tested-by: Sage Weil <[email protected]>
pos += len;
written += len;
left -= len;
- data += written;
+ data += len;
if (left)
goto more;