Correction to r268356: collide only sessions to the same target.

This commit is contained in:
Alexander Motin 2014-07-07 06:17:07 +00:00
parent 2c6c9e47b2
commit 99f8c067e6

View File

@ -1507,6 +1507,8 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci)
mtx_lock(&softc->lock);
TAILQ_FOREACH(cs2, &softc->sessions, cs_next) {
if (cs2 != cs && cs2->cs_tasks_aborted == false &&
cs->cs_target == cs2->cs_target &&
cs->cs_portal_group_tag == cs2->cs_portal_group_tag &&
strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) {
cfiscsi_session_terminate(cs2);
mtx_unlock(&softc->lock);