scsi: convert host_busy to atomic_t
authorChristoph Hellwig <hch@lst.de>
Thu, 26 Jun 2014 02:11:25 +0000 (20:11 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 2 Apr 2015 18:12:27 +0000 (12:12 -0600)
commitb92b25441f106b000a60e1e68f533689024bd95c
tree582e56366df8d3b5848c6659c14390cfe0bb1852
parent4a5801c8038bd8cace089c237ed473ece3be549a
scsi: convert host_busy to atomic_t

Avoid taking the host-wide host_lock to check the per-host queue limit.
Instead we do an atomic_inc_return early on to grab our slot in the queue,
and if nessecary decrement it after finishing all checks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/scsi/advansys.c
drivers/scsi/libiscsi.c
drivers/scsi/libsas/sas_scsi_host.c
drivers/scsi/qlogicpti.c
drivers/scsi/scsi.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_sysfs.c
include/scsi/scsi_host.h