]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix error path cleanup for opening an image 2239/head
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 11 Aug 2014 23:41:26 +0000 (16:41 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 11 Aug 2014 23:43:07 +0000 (16:43 -0700)
commit3dfa72d5b9a1f54934dc8289592556d30430959d
treecd6a1baab9530ead818f459548ac528b8cb2546e
parentc2e2fc56ea65fd3bbd22225475d763cd6266d386
librbd: fix error path cleanup for opening an image

If the image doesn't exist and caching is enabled, the ObjectCacher
was not being shutdown, and the ImageCtx was leaked. The IoCtx could
later be closed while the ObjectCacher was still running, resulting in
a segfault. Simply use the usual cleanup path in open_image(), which
works fine here.

Fixes: #8912
Backport: dumpling, firefly
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd/internal.cc
src/test/pybind/test_rbd.py