]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] fix the return value of scsi_target_queue_read()
authorHillf Danton <dhillf@gmail.com>
Thu, 16 Dec 2010 20:26:37 +0000 (14:26 -0600)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 21 Dec 2010 18:37:28 +0000 (12:37 -0600)
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>
drivers/scsi/scsi_lib.c

index 5b6bbaea59fec92565d2af4d708cedce034295ae..0ed7a66cdded9cbffc0fdf397bd9c3f8b7058d55 100644 (file)
@@ -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 */