From 547bfcfd8b75bb415454d28c9aaaddd67a7c9d92 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 7394a9ac7d0..a56ad1e07ee 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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; } -- 2.47.3