Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -611,7 +611,7 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
		pos += len;
		pos += len;
		written += len;
		written += len;
		left -= len;
		left -= len;
		data += written;
		data += len;
		if (left)
		if (left)
			goto more;
			goto more;