Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> --- usr/target.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/usr/target.c b/usr/target.c index a69fe0b..1b81d0d 100644 --- a/usr/target.c +++ b/usr/target.c @@ -294,6 +294,7 @@ int it_nexus_destroy(int tid, uint64_t itn_id) { int i; struct it_nexus *itn; + struct scsi_lu *lu; dprintf("%d %" PRIu64 "\n", tid, itn_id); @@ -305,6 +306,9 @@ int it_nexus_destroy(int tid, uint64_t itn_id) if (!list_empty(&itn->cmd_hash_list[i])) return -EBUSY; + list_for_each_entry(lu, &itn->nexus_target->device_list, device_siblings) + device_release(tid, itn_id, lu->lun, 0); + it_nexus_del_lu_info(itn); list_del(&itn->nexus_siblings); -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html |