[SCSI] avoid taking host_lock in scsi_run_queue unless nessecary
authorChristoph Hellwig <hch@infradead.org>
Thu, 20 Feb 2014 22:20:54 +0000 (14:20 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:24 +0000 (10:19 -0700)
commit21a05df547dd0ac532d3a89e241dc504018eb881
tree040b1db9ec38027f0b15b188dbf71be24584658e
parent44b93b59d544919aba1aea6fa95f1418f2aa870f
[SCSI] avoid taking host_lock in scsi_run_queue unless nessecary

If we don't have starved devices we don't need to take the host lock
to iterate over them.  Also split the function up to be more clear.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_lib.c