Skip to content

Commit

Permalink
[SCSI] fix the return value of scsi_target_queue_read()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hillf Danton authored and James Bottomley committed Dec 21, 2010
1 parent db42231 commit fd01a66
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit fd01a66

Please sign in to comment.