static int target_fabric_port_unlink( struct config_item *lun_ci, struct config_item *se_dev_ci) { struct se_lun *lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); struct se_portal_group *se_tpg = lun->lun_sep->sep_tpg; struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; if (tf->tf_ops.fabric_pre_unlink) { tf->tf_ops.fabric_pre_unlink(se_tpg, lun); } core_dev_del_lun(se_tpg, lun->unpacked_lun); return 0; }
static int target_fabric_port_unlink( struct config_item *lun_ci, struct config_item *se_dev_ci) { struct se_lun *lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); struct se_portal_group *se_tpg = lun->lun_sep->sep_tpg; struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; if (tf->tf_ops.fabric_pre_unlink) { /* * Call the optional fabric_pre_unlink() to allow a * fabric module to release any additional stat before * core_dev_del_lun() is called. */ tf->tf_ops.fabric_pre_unlink(se_tpg, lun); } core_dev_del_lun(se_tpg, lun->unpacked_lun); return 0; }