diff options
author | Alex Elder <elder@inktank.com> | 2013-05-13 20:35:38 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-01 09:52:02 -0700 |
commit | 912c317d4600b81664ad8f3d3ba6c1f2ff4b49c2 (patch) | |
tree | b5424c4ef1bcce1219d6979e36669f2ba97d6d18 /drivers/block | |
parent | 4d1bf79aff7962ab0654d66127ebb6eec17460ab (diff) | |
download | blackbird-op-linux-912c317d4600b81664ad8f3d3ba6c1f2ff4b49c2.tar.gz blackbird-op-linux-912c317d4600b81664ad8f3d3ba6c1f2ff4b49c2.zip |
rbd: drop original request earlier for existence check
The reference to the original request dropped at the end of
rbd_img_obj_exists_callback() corresponds to the reference taken
in rbd_img_obj_exists_submit() to account for the stat request
referring to it. Move the put of that reference up right after
clearing that pointer to make its purpose more obvious.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index b4f00e22743d..291802c52c65 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2535,6 +2535,7 @@ static void rbd_img_obj_exists_callback(struct rbd_obj_request *obj_request) */ orig_request = obj_request->obj_request; obj_request->obj_request = NULL; + rbd_obj_request_put(orig_request); rbd_assert(orig_request); rbd_assert(orig_request->img_request); @@ -2555,7 +2556,6 @@ static void rbd_img_obj_exists_callback(struct rbd_obj_request *obj_request) if (!rbd_dev->parent_overlap) { struct ceph_osd_client *osdc; - rbd_obj_request_put(orig_request); osdc = &rbd_dev->rbd_client->client->osdc; result = rbd_obj_request_submit(osdc, orig_request); if (!result) @@ -2585,7 +2585,6 @@ static void rbd_img_obj_exists_callback(struct rbd_obj_request *obj_request) out: if (orig_request->result) rbd_obj_request_complete(orig_request); - rbd_obj_request_put(orig_request); } static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request) |