Fix exported object deinitialization

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2021-06-24 14:24:04 +02:00
parent b650f3479d
commit 34dbbc056d

View File

@ -473,8 +473,6 @@ int block_dev_destroy_exported_object(ocf_core_t core)
if (!bvol->expobj_valid)
return 0;
destroy_workqueue(bvol->expobj_wq);
ret = casdisk_functions.casdsk_exp_obj_lock(bvol->dsk);
if (ret) {
if (-EBUSY == ret)
@ -486,6 +484,8 @@ int block_dev_destroy_exported_object(ocf_core_t core)
if (!ret)
bvol->expobj_valid = false;
destroy_workqueue(bvol->expobj_wq);
casdisk_functions.casdsk_exp_obj_unlock(bvol->dsk);
return ret;