rbd: clear ->xferred on error from rbd_obj_issue_copyup()
authorIlya Dryomov <idryomov@gmail.com>
Fri, 1 Mar 2019 11:06:24 +0000 (12:06 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 5 Mar 2019 17:55:17 +0000 (18:55 +0100)
Otherwise the assert in rbd_obj_end_request() is triggered.

Fixes: 3da691bf4366 ("rbd: new request handling code")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c

index 324f61b..c247938 100644 (file)
@@ -2585,6 +2585,7 @@ again:
                ret = rbd_obj_issue_copyup(obj_req, obj_req->xferred);
                if (ret) {
                        obj_req->result = ret;
+                       obj_req->xferred = 0;
                        return true;
                }
                return false;