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)
committerJens Axboe <axboe@fb.com>
Thu, 2 Apr 2015 18:12:25 +0000 (12:12 -0600)
commitc1831c08f232993fab2f47723cc0d0b3ff620c33
tree726b486a342ce203a48a7dcac2c5506b4aec0e67
parenteca7d8545507e54bd3266f86421c34fa0e544cc0
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