From patchwork Wed May 3 20:50:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Butterfield X-Patchwork-Id: 9710413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B93E86021C for ; Wed, 3 May 2017 20:50:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7A9228686 for ; Wed, 3 May 2017 20:50:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C46828694; Wed, 3 May 2017 20:50:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3021628686 for ; Wed, 3 May 2017 20:50:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755501AbdECUuf (ORCPT ); Wed, 3 May 2017 16:50:35 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36552 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754354AbdECUuf (ORCPT ); Wed, 3 May 2017 16:50:35 -0400 Received: by mail-it0-f67.google.com with SMTP id x188so182950itb.3 for ; Wed, 03 May 2017 13:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bp7y4oBRD7pK/zzugbLYckFk3f3hZzVZ5ZBespw/JsA=; b=DW8/s2mIlAC+YZx7IT52N+uHZzQ7NDIxBBPbBNaVr2oxz1XmgN+CILGXpXJJi4hfOi SmkIs70njLqvnRP7KCA9X5ZdyX5rxKh9QW8jEr6DTmvDyIMOCxFfVHFibm08uwOYGYTC kgMI0/Uky4oUwsU+qs4aelOM00Mm3eBJQtlug8bcaT7l2/iexL+fdwy/S50qWfDTzndL v9kPkSfRurRKpx3KbCstgcHZFGPTyOcBXhWWKs1/ln7aJuJXiAyHx079rzru0xh0Jiep W48OGvfDrs+0in/IW0Ty7S8kzSLAUlTEEYjRHPT38kjNEK0sX7SJSkGR8djvfBXZcrA1 nZ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bp7y4oBRD7pK/zzugbLYckFk3f3hZzVZ5ZBespw/JsA=; b=Mmqtg+nTUbMqXEWWoFeonKTTidvuByWz4wyc2zRSnRq9tZwm8cJzQj3uz+xbBH9qqG d9VchcBvs7bmqFRMEh3OsaT+iL1oJg0zJR5+1buqJLGAYqbMTiu6wI3NKp2wdUAgMKgt xOWe4NdeFuzdy9lavIGX4OCnOts1urvQCjbnz+tUxURxSRUvb4lIJdyZ1aF4uJ8hP9OV zFl3yyDbMRmTuJRI9KCyME8zBlp628tC+2PwWa1F3mMpMIWCO3Lu0ez1YmaisoDdNxYX eSWWyM/Z2X7JbSq0pp/m9sYZ/wvDxPZ8RyuunVGNWgfbNgGmokFuhJCJr6Xq9py3bMVH CJhg== X-Gm-Message-State: AN3rC/439Ty9Baf0RGvZe8OJq6fqanVHBXVNfvu4sO69zsQXCjf+qSoj cA+WDDEU8/em6CH4 X-Received: by 10.36.82.12 with SMTP id d12mr3108318itb.106.1493844634040; Wed, 03 May 2017 13:50:34 -0700 (PDT) Received: from localhost.localdomain (c-73-181-28-74.hsd1.co.comcast.net. [73.181.28.74]) by smtp.gmail.com with ESMTPSA id z26sm61277ita.8.2017.05.03.13.50.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 May 2017 13:50:33 -0700 (PDT) From: David Butterfield To: target-devel@vger.kernel.org Cc: David Butterfield Subject: [PATCH] only destroy rados_ioctx if it has been created Date: Wed, 3 May 2017 14:50:05 -0600 Message-Id: <20170503205007.21976-1-dab21774@gmail.com> X-Mailer: git-send-email 2.12.2.575.gb14f27f Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: David Butterfield --- rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbd.c b/rbd.c index ffe1cb0..efd001f 100644 --- a/rbd.c +++ b/rbd.c @@ -160,7 +160,7 @@ static int tcmu_rbd_image_open(struct tcmu_device *dev) if (ret < 0) { tcmu_dev_err(dev, "Could not create ioctx for pool %s. (Err %d)\n", state->pool_name, ret); - goto rados_destroy; + goto rados_shutdown; } ret = rbd_open(state->io_ctx, state->image_name, &state->image, NULL);