Do not deinit user volume

The user is supposed to deinit/destroy it.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Robert Baldyga 2023-10-03 16:58:38 +02:00 committed by Michal Mielewczyk
parent 3d99a2c938
commit 87b16aef6a

View File

@ -1926,8 +1926,6 @@ static void _ocf_mngt_attach_handle_error(
if (context->flags.volume_inited) if (context->flags.volume_inited)
ocf_volume_deinit(&cache->device->volume); ocf_volume_deinit(&cache->device->volume);
else
ocf_volume_deinit(context->cfg.device.volume);
if (context->flags.front_volume_opened) if (context->flags.front_volume_opened)
ocf_volume_close(&cache->device->front_volume); ocf_volume_close(&cache->device->front_volume);
@ -2602,8 +2600,6 @@ static void _ocf_mngt_activate_handle_error(
if (context->flags.volume_inited) if (context->flags.volume_inited)
ocf_volume_deinit(&cache->device->volume); ocf_volume_deinit(&cache->device->volume);
else
ocf_volume_deinit(context->cfg.device.volume);
if (context->flags.metadata_frozen) if (context->flags.metadata_frozen)
ocf_refcnt_unfreeze(&cache->refcnt.metadata); ocf_refcnt_unfreeze(&cache->refcnt.metadata);