From fd01a6632da253210c3dbc7814bc6eceda96623d Mon Sep 17 00:00:00 2001 From: Hillf Danton Date: Thu, 16 Dec 2010 14:26:37 -0600 Subject: [PATCH] [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: Hillf Danton Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/scsi_lib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 5b6bbaea59fe..0ed7a66cdded 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -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 */ -- 2.30.2