]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't close an already closed parent image upon failure 3079/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 6 Nov 2014 10:01:38 +0000 (05:01 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 2 Dec 2014 18:07:26 +0000 (13:07 -0500)
If librbd is not able to open a child's parent image, it will
incorrectly close the parent image twice, resulting in a crash.

Fixes: #10030
Backport: firefly, giant
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 61ebfebd59b61ffdc203dfeca01ee1a02315133e)

src/librbd/internal.cc

index 7394a9ac7d0b8dba9fefa5d6918ba629631ca938..a56ad1e07eeeaacd295158361e209287d961e294 100644 (file)
@@ -1254,7 +1254,6 @@ reprotect_and_return_err:
     if (r < 0) {
       lderr(ictx->cct) << "error opening parent image: " << cpp_strerror(r)
                       << dendl;
-      close_image(ictx->parent);
       ictx->parent = NULL;
       return r;
     }