mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst: Remove deprecated create_workqueue()
alloc_workqueue() replaces deprecated create_workqueue().
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user