scst: Remove deprecated create_workqueue()

alloc_workqueue() replaces deprecated create_workqueue().
This commit is contained in:
Gleb Chesnokov
2022-11-04 12:24:46 +03:00
parent bff6597767
commit f4686e9102
3 changed files with 13 additions and 8 deletions

View File

@@ -138,7 +138,7 @@ int isert_global_init(void)
spin_lock_init(&isert_glob.portal_lock);
init_waitqueue_head(&isert_glob.portal_wq);
isert_glob.conn_wq = create_workqueue("isert_conn_wq");
isert_glob.conn_wq = alloc_workqueue("isert_conn_wq", WQ_MEM_RECLAIM, 0);
if (!isert_glob.conn_wq) {
PRINT_ERROR("Failed to alloc iser conn work queue");
return -ENOMEM;
@@ -148,21 +148,26 @@ int isert_global_init(void)
SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN,
iscsi);
if (!isert_cmnd_cache) {
destroy_workqueue(isert_glob.conn_wq);
PRINT_ERROR("Failed to alloc iser command cache");
return -ENOMEM;
goto free_wq;
}
isert_conn_cache = KMEM_CACHE(isert_conn,
SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN);
if (!isert_conn_cache) {
destroy_workqueue(isert_glob.conn_wq);
kmem_cache_destroy(isert_cmnd_cache);
PRINT_ERROR("Failed to alloc iser connection cache");
return -ENOMEM;
goto free_cmnd_cache;
}
return 0;
free_cmnd_cache:
kmem_cache_destroy(isert_cmnd_cache);
free_wq:
destroy_workqueue(isert_glob.conn_wq);
return -ENOMEM;
}
void isert_global_cleanup(void)

View File

@@ -450,7 +450,7 @@ static int qla25xx_setup_mode(struct scsi_qla_host *vha)
"Failed to create request queue.\n");
goto fail;
}
ha->wq = create_workqueue("qla2xxx_wq");
ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 0);
vha->req = ha->req_q_map[req];
options |= BIT_1;
for (ques = 1; ques < ha->max_rsp_queues; ques++) {

View File

@@ -15311,7 +15311,7 @@ int __init scst_lib_init(void)
scst_scsi_op_list_init();
scst_release_acg_wq = create_workqueue("scst_release_acg");
scst_release_acg_wq = alloc_workqueue("scst_release_acg", WQ_MEM_RECLAIM, 0);
if (unlikely(!scst_release_acg_wq)) {
PRINT_ERROR("Failed to allocate scst_release_acg_wq");
res = -ENOMEM;