diff mbox

only destroy rados_ioctx if it has been created

Message ID 20170503205007.21976-1-dab21774@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Butterfield May 3, 2017, 8:50 p.m. UTC
Signed-off-by: David Butterfield <dab21774@gmail.com>
---
 rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mike Christie May 3, 2017, 11:39 p.m. UTC | #1
On 05/03/2017 03:50 PM, David Butterfield wrote:
> Signed-off-by: David Butterfield <dab21774@gmail.com>
> ---
>  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);
> 

Merged. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);