rbd: don't crash or leak on errors in rbd_img_obj_parent_read_full_callback()
authorIlya Dryomov <idryomov@gmail.com>
Fri, 16 Sep 2016 13:20:42 +0000 (15:20 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 3 Oct 2016 14:13:48 +0000 (16:13 +0200)
commitfa355112c2763d513f1356119684dc8a6150d08a
tree79c17910121d385b7ed4654fc3753b66eb2ce215
parent4a17dadcae55ca1f5c1ed826d42185e22653c256
rbd: don't crash or leak on errors in rbd_img_obj_parent_read_full_callback()

- fix parent_length == img_request->xferred assert to not fire on
  copyup read failures
- don't leak pages if copyup read fails or we can't allocate a new osd
  request

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
drivers/block/rbd.c