summaryrefslogtreecommitdiff
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-05-06 22:40:32 (GMT)
committerAlex Elder <elder@inktank.com>2013-05-09 01:16:10 (GMT)
commit91c6febb3817be576785ef06aeaaa8ed423e0a2a (patch)
treeda91f0eb4b61bc7e570d7422157927253a71c017 /drivers/block/rbd.c
parent2df3fac75851dc4257b90dc72fdd3cf27ba177bc (diff)
downloadlinux-91c6febb3817be576785ef06aeaaa8ed423e0a2a.tar.xz
rbd: fix an incorrect assertion condition
In rbd_img_obj_parent_read_full_callback() there is an assertion intended to verify the size of the image request for a full parent read was the size of the original request's target object. But assertion was looking at the parent image order rather than the original one, and these values can differ. Fix that. This resolves: http://tracker.ceph.com/issues/4938 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 0d874a5..15ac2a5 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2186,13 +2186,13 @@ rbd_img_obj_parent_read_full_callback(struct rbd_img_request *img_request)
result = img_request->result;
obj_size = img_request->length;
xferred = img_request->xferred;
+ rbd_img_request_put(img_request);
- rbd_dev = img_request->rbd_dev;
+ rbd_assert(orig_request->img_request);
+ rbd_dev = orig_request->img_request->rbd_dev;
rbd_assert(rbd_dev);
rbd_assert(obj_size == (u64)1 << rbd_dev->header.obj_order);
- rbd_img_request_put(img_request);
-
if (result)
goto out_err;