Rework r269444 to work also for lists without IDs.

MFC after:	3 days
This commit is contained in:
Alexander Motin 2014-08-02 23:20:43 +00:00
parent dd973b0e15
commit c5c6059574

View file

@ -942,14 +942,14 @@ tpc_process(struct tpc_list *list)
done:
//printf("ZZZ done\n");
free(list->params, M_CTL);
list->params = NULL;
mtx_lock(&lun->lun_lock);
if ((list->flags & EC_LIST_ID_USAGE_MASK) == EC_LIST_ID_USAGE_NONE) {
TAILQ_REMOVE(&lun->tpc_lists, list, links);
free(list, M_CTL);
} else {
list->completed = 1;
free(list->params, M_CTL);
list->params = NULL;
list->sense_data = ctsio->sense_data;
list->sense_len = ctsio->sense_len;
list->scsi_status = ctsio->scsi_status;