Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298866
b: refs/heads/master
c: 06383f1
h: refs/heads/master
v: v3
  • Loading branch information
Mark Rustad authored and Nicholas Bellinger committed Apr 7, 2012
1 parent 517f371 commit fbd0386
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1c4038282c7586c3544542b37872c434669d3ac
refs/heads/master: 06383f10c49f507220594a455c6491ca6f8c94ab
13 changes: 8 additions & 5 deletions trunk/drivers/target/tcm_fc/tfc_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ static struct se_portal_group *ft_add_tpg(
{
struct ft_lport_acl *lacl;
struct ft_tpg *tpg;
struct workqueue_struct *wq;
unsigned long index;
int ret;

Expand All @@ -321,18 +322,20 @@ static struct se_portal_group *ft_add_tpg(
tpg->lport_acl = lacl;
INIT_LIST_HEAD(&tpg->lun_list);

ret = core_tpg_register(&ft_configfs->tf_ops, wwn, &tpg->se_tpg,
tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
wq = alloc_workqueue("tcm_fc", 0, 1);
if (!wq) {
kfree(tpg);
return NULL;
}

tpg->workqueue = alloc_workqueue("tcm_fc", 0, 1);
if (!tpg->workqueue) {
ret = core_tpg_register(&ft_configfs->tf_ops, wwn, &tpg->se_tpg,
tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
destroy_workqueue(wq);
kfree(tpg);
return NULL;
}
tpg->workqueue = wq;

mutex_lock(&ft_lport_lock);
list_add_tail(&tpg->list, &lacl->tpg_list);
Expand Down

0 comments on commit fbd0386

Please sign in to comment.