Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd01a663 authored by Hillf Danton's avatar Hillf Danton Committed by James Bottomley
Browse files

[SCSI] fix the return value of scsi_target_queue_read()



It seems that zero should be returned if scsi_target_is_busy(starget) is
true, no matter if sdev is on the starved list.

Signed-off-by: default avatarHillf Danton <dhillf@gmail.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent db422318
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -1278,12 +1278,11 @@ static inline int scsi_target_queue_ready(struct Scsi_Host *shost,
	}
	}


	if (scsi_target_is_busy(starget)) {
	if (scsi_target_is_busy(starget)) {
		if (list_empty(&sdev->starved_entry)) {
		if (list_empty(&sdev->starved_entry))
			list_add_tail(&sdev->starved_entry,
			list_add_tail(&sdev->starved_entry,
				      &shost->starved_list);
				      &shost->starved_list);
		return 0;
		return 0;
	}
	}
	}


	/* We're OK to process the command, so we can't be starved */
	/* We're OK to process the command, so we can't be starved */
	if (!list_empty(&sdev->starved_entry))
	if (!list_empty(&sdev->starved_entry))