From 02d4685c56e129cb179a5ddfb8e87aefc2fce0b5 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 6 Nov 2014 05:01:38 -0500 Subject: [PATCH] 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 (cherry picked from commit 61ebfebd59b61ffdc203dfeca01ee1a02315133e) --- src/librbd/internal.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index afa466025327e..dd7aef12470d7 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1260,7 +1260,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; } -- 2.39.5