From ea775178b61ba38237343b07a90d19802f0b7dac Mon Sep 17 00:00:00 2001 From: runsisi Date: Tue, 5 Jul 2016 16:08:40 +0800 Subject: [PATCH] librbd: fix missing return statement if failed to get mirror image state Signed-off-by: runsisi --- src/librbd/internal.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index d9fdec253ff..4172392ae63 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1839,6 +1839,7 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force, if (r < 0 && r != -ENOENT) { lderr(cct) << "error retrieving mirroring state: " << cpp_strerror(r) << dendl; + return r; } if (mirror_image.state == cls::rbd::MIRROR_IMAGE_STATE_ENABLED) { -- 2.39.5