提交 fd01a663 编写于 作者: H Hillf Danton 提交者: 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: NHillf Danton <dhillf@gmail.com>
Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 db422318
......@@ -1278,11 +1278,10 @@ 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;
}
return 0;
}
/* We're OK to process the command, so we can't be starved */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册