diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-04-12 05:30:32 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-04-16 04:11:22 +0200 |
commit | 18c4f0a42b08ced680aa287a9cf3c94b6f9a752f (patch) | |
tree | b87e6bea0551c833556a529c8b2eb0a8c72970ed /drivers/scsi/initio.c | |
parent | scsi: qla2xxx: Fix read offset in qla24xx_load_risc_flash() (diff) | |
download | linux-18c4f0a42b08ced680aa287a9cf3c94b6f9a752f.tar.xz linux-18c4f0a42b08ced680aa287a9cf3c94b6f9a752f.zip |
scsi: core: don't hold device refcount in IO path
scsi_device's refcount is always grabbed in IO path.
Turns out it isn't necessary, because blk_queue_cleanup() will drain any
in-flight IOs, then cancel timeout/requeue work, and SCSI's requeue_work is
canceled too in __scsi_remove_device().
Also scsi_device won't go away until blk_cleanup_queue() is done.
So don't hold the refcount in IO path, especially the refcount isn't
required in IO path since blk_queue_enter() / blk_queue_exit() is
introduced in the legacy block layer.
Cc: Dongli Zhang <dongli.zhang@oracle.com>
Cc: James Smart <james.smart@broadcom.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: linux-scsi@vger.kernel.org,
Cc: Martin K . Petersen <martin.petersen@oracle.com>,
Cc: Christoph Hellwig <hch@lst.de>,
Cc: James E . J . Bottomley <jejb@linux.vnet.ibm.com>,
Cc: jianchao wang <jianchao.w.wang@oracle.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/initio.c')
0 files changed, 0 insertions, 0 deletions