Merge pull request #1158 from robertbaldyga/exp-obj-queue-lifetime

Do not destroy expobj_wq if destroying exporting object failed
This commit is contained in:
Robert Baldyga 2022-04-01 10:11:58 +02:00 committed by GitHub
commit 571227e056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;