X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Ftarget%2Ftarget_core_device.c;h=e784284cbc2e79575ff04a9b069ab8b1f400b951;hb=cd9d7cbaec8b622eee4edcd8bf481c4047f74915;hp=98da90167159b198dfc65a8ebdc912b350e4c6f0;hpb=f536b3cae84eb7c9f3495285ad048d13a397ed0b;p=cascardo%2Flinux.git diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 98da90167159..e784284cbc2e 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -1250,24 +1250,16 @@ struct se_lun *core_dev_add_lun( * * */ -int core_dev_del_lun( +void core_dev_del_lun( struct se_portal_group *tpg, - u32 unpacked_lun) + struct se_lun *lun) { - struct se_lun *lun; - - lun = core_tpg_pre_dellun(tpg, unpacked_lun); - if (IS_ERR(lun)) - return PTR_ERR(lun); - - core_tpg_post_dellun(tpg, lun); - - pr_debug("%s_TPG[%u]_LUN[%u] - Deactivated %s Logical Unit from" + pr_debug("%s_TPG[%u]_LUN[%u] - Deactivating %s Logical Unit from" " device object\n", tpg->se_tpg_tfo->get_fabric_name(), - tpg->se_tpg_tfo->tpg_get_tag(tpg), unpacked_lun, + tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, tpg->se_tpg_tfo->get_fabric_name()); - return 0; + core_tpg_remove_lun(tpg, lun); } struct se_lun *core_get_lun_from_tpg(struct se_portal_group *tpg, u32 unpacked_lun)