Merge pull request #841 from robertbaldyga/fix-exp-obj-deinit

Fix exported object deinitialization
This commit is contained in:
Robert Baldyga 2021-06-24 15:15:49 +02:00 committed by GitHub
commit e24a37ad40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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