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

[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
......@@ -1278,12 +1278,11 @@ static inline int scsi_target_queue_ready(struct Scsi_Host *shost,
}
if (scsi_target_is_busy(starget)) {
if (list_empty(&sdev->starved_entry)) {
if (list_empty(&sdev->starved_entry))
list_add_tail(&sdev->starved_entry,
&shost->starved_list);
return 0;
}
}
/* We're OK to process the command, so we can't be starved */
if (!list_empty(&sdev->starved_entry))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment