Commit d8369fee authored by Xiaofan Yang's avatar Xiaofan Yang
Browse files

iscsi/conn: Fix the bug when iterates the read command subtasks.



Change-Id: Ib11e804977b6057bcb9cc6d3a2d21ec43b45a99a
Signed-off-by: default avatarXiaofan Yang <xiaofanx.yang@intel.com>
parent becdc9a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -886,7 +886,7 @@ process_read_task_completion(struct spdk_iscsi_conn *conn,

	if ((task != primary) &&
	    (task->scsi.offset != primary->bytes_completed)) {
		TAILQ_FOREACH(tmp, &primary->subtask_list, link) {
		TAILQ_FOREACH(tmp, &primary->subtask_list, subtask_link) {
			if (task->scsi.offset < tmp->scsi.offset) {
				TAILQ_INSERT_BEFORE(tmp, task, subtask_link);
				flag = true;