]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: don't forget to call close_image() if remove_child() fails
authorIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 29 Jan 2014 14:12:01 +0000 (16:12 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 30 Jan 2014 12:47:45 +0000 (14:47 +0200)
close_image() among other things unregisters a watcher that's been
registered by open_image().  Even though it'll timeout in 30 or so
seconds, it's not nice now that we check for watchers before starting
the removal process.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/librbd/internal.cc

index 2cd6b8d8565b756b1ac5b6bd81eec9c5993f3298..61e910b07ed28e464a52c7cb09de138e5fe29adc 100644 (file)
@@ -1391,6 +1391,7 @@ reprotect_and_return_err:
                                   parent_info.spec, id);
       if (r < 0 && r != -ENOENT) {
        lderr(cct) << "error removing child from children list" << dendl;
+        close_image(ictx);
        return r;
       }
       close_image(ictx);