rbd: clear ->xferred on error from rbd_obj_issue_copyup()

[ Upstream commit 356889c49d ]

Otherwise the assert in rbd_obj_end_request() is triggered.

Fixes: 3da691bf43 ("rbd: new request handling code")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Ilya Dryomov 2019-03-01 12:06:24 +01:00 committed by Greg Kroah-Hartman
parent 54cf6fff4f
commit 080ba12cc1

View file

@ -2506,6 +2506,7 @@ static bool rbd_obj_handle_write(struct rbd_obj_request *obj_req)
ret = rbd_obj_issue_copyup(obj_req, obj_req->xferred);
if (ret) {
obj_req->result = ret;
obj_req->xferred = 0;
return true;
}
return false;