summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-09-13 22:08:10 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-10-03 17:13:47 +0300
commit4a17dadcae55ca1f5c1ed826d42185e22653c256 (patch)
tree06b25176db3e0a4675dfa5c94f5d63a310515008 /tools/perf/scripts/python/stackcollapse.py
parentc2e82414884718ad6ec33a7528606cb07cf55cb4 (diff)
downloadlinux-4a17dadcae55ca1f5c1ed826d42185e22653c256.tar.xz
rbd: move bumping img_request refcount into rbd_obj_request_submit()
Commit 0f2d5be792b0 ("rbd: use reference counts for image requests") added rbd_img_request_get(), which rbd_img_request_fill() calls for each obj_request added to img_request. It was an urgent band-aid for the uglyness that is rbd_img_obj_callback() and none of the error paths were updated. Given that this img_request reference is meant to represent an obj_request that hasn't passed through rbd_img_obj_callback() yet, proper cleanup in appropriate destructors is a challenge. However, noting that if we don't get a chance to call rbd_obj_request_complete(), there is not going to be a call to rbd_img_obj_callback(), we can move rbd_img_request_get() into rbd_obj_request_submit() and fixup the two places that call rbd_obj_request_complete() directly and not through rbd_obj_request_submit() to temporarily bump img_request, so that rbd_img_obj_callback() can put as usual. This takes care of img_request leaks on errors on the submit side. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions