From: Jason Dillaman Date: Thu, 6 Nov 2014 10:01:38 +0000 (-0500) Subject: librbd: don't close an already closed parent image upon failure X-Git-Tag: v0.89~44^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=61ebfebd59b61ffdc203dfeca01ee1a02315133e;p=ceph.git librbd: don't close an already closed parent image upon failure 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 --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 5fe47b44cb60..79386222f7f2 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1288,7 +1288,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; }