diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-03-04 04:57:17 -0500 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2014-04-02 22:33:51 -0400 |
commit | 42dd037c08c7cd6e3e9af7824b0c1d063f838885 (patch) | |
tree | 22feb77f7d409ff80ec6dde66c340b595a8839f7 /drivers/block | |
parent | 62054da65c626dd603190c16805f92cf2cf47d4c (diff) |
rbd: fix error paths in rbd_img_request_fill()
Doing rbd_obj_request_put() in rbd_img_request_fill() error paths is
not only insufficient, but also triggers an rbd_assert() in
rbd_obj_request_destroy():
Assertion failure in rbd_obj_request_destroy() at line 1867:
rbd_assert(obj_request->img_request == NULL);
rbd_img_obj_request_add() adds obj_requests to the img_request, the
opposite is rbd_img_obj_request_del(). Use it.
Fixes: http://tracker.ceph.com/issues/7327
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 43b9814edf97..b55b7812cf93 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -2252,7 +2252,7 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request, | |||
2252 | 2252 | ||
2253 | out_unwind: | 2253 | out_unwind: |
2254 | for_each_obj_request_safe(img_request, obj_request, next_obj_request) | 2254 | for_each_obj_request_safe(img_request, obj_request, next_obj_request) |
2255 | rbd_obj_request_put(obj_request); | 2255 | rbd_img_obj_request_del(img_request, obj_request); |
2256 | 2256 | ||
2257 | return -ENOMEM; | 2257 | return -ENOMEM; |
2258 | } | 2258 | } |