|
Lines 751-762
static int target_fabric_port_link(
Link Here
|
| 751 |
struct target_fabric_configfs *tf; |
751 |
struct target_fabric_configfs *tf; |
| 752 |
int ret; |
752 |
int ret; |
| 753 |
|
753 |
|
| 754 |
if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) { |
|
|
| 755 |
pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:" |
| 756 |
" %p to struct se_device: %p\n", se_dev_ci, dev); |
| 757 |
return -EFAULT; |
| 758 |
} |
| 759 |
|
| 760 |
tpg_ci = &lun_ci->ci_parent->ci_group->cg_item; |
754 |
tpg_ci = &lun_ci->ci_parent->ci_group->cg_item; |
| 761 |
se_tpg = container_of(to_config_group(tpg_ci), |
755 |
se_tpg = container_of(to_config_group(tpg_ci), |
| 762 |
struct se_portal_group, tpg_group); |
756 |
struct se_portal_group, tpg_group); |
|
Lines 775-780
static int target_fabric_port_link(
Link Here
|
| 775 |
goto out; |
769 |
goto out; |
| 776 |
} |
770 |
} |
| 777 |
|
771 |
|
|
|
772 |
if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) { |
| 773 |
pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:" |
| 774 |
" %p to struct se_device: %p\n", se_dev_ci, dev); |
| 775 |
return -EFAULT; |
| 776 |
} |
| 777 |
|
| 778 |
lun_p = core_dev_add_lun(se_tpg, dev, lun->unpacked_lun); |
778 |
lun_p = core_dev_add_lun(se_tpg, dev, lun->unpacked_lun); |
| 779 |
if (IS_ERR(lun_p)) { |
779 |
if (IS_ERR(lun_p)) { |
| 780 |
pr_err("core_dev_add_lun() failed\n"); |
780 |
pr_err("core_dev_add_lun() failed\n"); |
| 781 |
- |
|
|