Do not destroy expobj_wq if destroying exporting object failed

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2022-03-31 21:36:27 +02:00
parent e3d6b0f96f
commit df36c027a6

View File

@ -584,11 +584,13 @@ static int kcas_volume_destroy_exported_object(ocf_volume_t volume)
return result;
result = casdisk_functions.casdsk_exp_obj_destroy(bvol->dsk);
if (!result)
bvol->expobj_valid = false;
if (result)
goto out;
bvol->expobj_valid = false;
destroy_workqueue(bvol->expobj_wq);
out:
casdisk_functions.casdsk_exp_obj_unlock(bvol->dsk);
return result;