aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorHillf Danton <dhillf@gmail.com>2010-12-16 15:26:37 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:37:28 -0500
commitfd01a6632da253210c3dbc7814bc6eceda96623d (patch)
treed3dff6d44978a54f4c6272c570a478740db9f8c8 /drivers/scsi/scsi_lib.c
parentdb422318cbca55168cf965f655471dbf8be82433 (diff)
[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 <dhillf@gmail.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c5
1 files 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,
1278 } 1278 }
1279 1279
1280 if (scsi_target_is_busy(starget)) { 1280 if (scsi_target_is_busy(starget)) {
1281 if (list_empty(&sdev->starved_entry)) { 1281 if (list_empty(&sdev->starved_entry))
1282 list_add_tail(&sdev->starved_entry, 1282 list_add_tail(&sdev->starved_entry,
1283 &shost->starved_list); 1283 &shost->starved_list);
1284 return 0; 1284 return 0;
1285 }
1286 } 1285 }
1287 1286
1288 /* We're OK to process the command, so we can't be starved */ 1287 /* We're OK to process the command, so we can't be starved */