diff options
Diffstat (limited to 'drivers/target/tcm_fc/tfc_conf.c')
| -rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index 8781d1e423df..8fa39b74f22c 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c | |||
| @@ -256,7 +256,7 @@ struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata) | |||
| 256 | struct se_portal_group *se_tpg = &tpg->se_tpg; | 256 | struct se_portal_group *se_tpg = &tpg->se_tpg; |
| 257 | struct se_node_acl *se_acl; | 257 | struct se_node_acl *se_acl; |
| 258 | 258 | ||
| 259 | spin_lock_bh(&se_tpg->acl_node_lock); | 259 | spin_lock_irq(&se_tpg->acl_node_lock); |
| 260 | list_for_each_entry(se_acl, &se_tpg->acl_node_list, acl_list) { | 260 | list_for_each_entry(se_acl, &se_tpg->acl_node_list, acl_list) { |
| 261 | acl = container_of(se_acl, struct ft_node_acl, se_node_acl); | 261 | acl = container_of(se_acl, struct ft_node_acl, se_node_acl); |
| 262 | pr_debug("acl %p port_name %llx\n", | 262 | pr_debug("acl %p port_name %llx\n", |
| @@ -270,7 +270,7 @@ struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata) | |||
| 270 | break; | 270 | break; |
| 271 | } | 271 | } |
| 272 | } | 272 | } |
| 273 | spin_unlock_bh(&se_tpg->acl_node_lock); | 273 | spin_unlock_irq(&se_tpg->acl_node_lock); |
| 274 | return found; | 274 | return found; |
| 275 | } | 275 | } |
| 276 | 276 | ||
| @@ -327,7 +327,6 @@ static struct se_portal_group *ft_add_tpg( | |||
| 327 | tpg->index = index; | 327 | tpg->index = index; |
| 328 | tpg->lport_acl = lacl; | 328 | tpg->lport_acl = lacl; |
| 329 | INIT_LIST_HEAD(&tpg->lun_list); | 329 | INIT_LIST_HEAD(&tpg->lun_list); |
| 330 | transport_init_queue_obj(&tpg->qobj); | ||
| 331 | 330 | ||
| 332 | ret = core_tpg_register(&ft_configfs->tf_ops, wwn, &tpg->se_tpg, | 331 | ret = core_tpg_register(&ft_configfs->tf_ops, wwn, &tpg->se_tpg, |
| 333 | tpg, TRANSPORT_TPG_TYPE_NORMAL); | 332 | tpg, TRANSPORT_TPG_TYPE_NORMAL); |
| @@ -336,8 +335,8 @@ static struct se_portal_group *ft_add_tpg( | |||
| 336 | return NULL; | 335 | return NULL; |
| 337 | } | 336 | } |
| 338 | 337 | ||
| 339 | tpg->thread = kthread_run(ft_thread, tpg, "ft_tpg%lu", index); | 338 | tpg->workqueue = alloc_workqueue("tcm_fc", 0, 1); |
| 340 | if (IS_ERR(tpg->thread)) { | 339 | if (!tpg->workqueue) { |
| 341 | kfree(tpg); | 340 | kfree(tpg); |
| 342 | return NULL; | 341 | return NULL; |
| 343 | } | 342 | } |
| @@ -356,7 +355,7 @@ static void ft_del_tpg(struct se_portal_group *se_tpg) | |||
| 356 | pr_debug("del tpg %s\n", | 355 | pr_debug("del tpg %s\n", |
| 357 | config_item_name(&tpg->se_tpg.tpg_group.cg_item)); | 356 | config_item_name(&tpg->se_tpg.tpg_group.cg_item)); |
| 358 | 357 | ||
| 359 | kthread_stop(tpg->thread); | 358 | destroy_workqueue(tpg->workqueue); |
| 360 | 359 | ||
| 361 | /* Wait for sessions to be freed thru RCU, for BUG_ON below */ | 360 | /* Wait for sessions to be freed thru RCU, for BUG_ON below */ |
| 362 | synchronize_rcu(); | 361 | synchronize_rcu(); |
| @@ -655,9 +654,7 @@ static void __exit ft_exit(void) | |||
| 655 | synchronize_rcu(); | 654 | synchronize_rcu(); |
| 656 | } | 655 | } |
| 657 | 656 | ||
| 658 | #ifdef MODULE | ||
| 659 | MODULE_DESCRIPTION("FC TCM fabric driver " FT_VERSION); | 657 | MODULE_DESCRIPTION("FC TCM fabric driver " FT_VERSION); |
| 660 | MODULE_LICENSE("GPL"); | 658 | MODULE_LICENSE("GPL"); |
| 661 | module_init(ft_init); | 659 | module_init(ft_init); |
| 662 | module_exit(ft_exit); | 660 | module_exit(ft_exit); |
| 663 | #endif /* MODULE */ | ||
