Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hillf Danton and committed by
James Bottomley
fd01a663 db422318

+2 -3
+2 -3
drivers/scsi/scsi_lib.c
··· 1278 1278 } 1279 1279 1280 1280 if (scsi_target_is_busy(starget)) { 1281 - if (list_empty(&sdev->starved_entry)) { 1281 + if (list_empty(&sdev->starved_entry)) 1282 1282 list_add_tail(&sdev->starved_entry, 1283 1283 &shost->starved_list); 1284 - return 0; 1285 - } 1284 + return 0; 1286 1285 } 1287 1286 1288 1287 /* We're OK to process the command, so we can't be starved */