diff options
author | Christoph Hellwig <hch@infradead.org> | 2014-02-20 23:20:55 +0100 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-15 18:19:24 +0100 |
commit | 0479633686d370303e3430256ace4bd5f7f138dc (patch) | |
tree | 8315562a82e4c64712d2d8ee423be2f346aa27c5 /drivers/scsi/scsi_tgt_lib.c | |
parent | [SCSI] avoid taking host_lock in scsi_run_queue unless nessecary (diff) | |
download | linux-0479633686d370303e3430256ace4bd5f7f138dc.tar.xz linux-0479633686d370303e3430256ace4bd5f7f138dc.zip |
[SCSI] do not manipulate device reference counts in scsi_get/put_command
Many callers won't need this and we can optimize them away. In addition
the handling in the __-prefixed variants was inconsistant to start with.
Based on an earlier patch from Bart Van Assche.
[jejb: fix kerneldoc probelm picked up by Fengguang Wu]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_tgt_lib.c')
-rw-r--r-- | drivers/scsi/scsi_tgt_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index 84a1fdf67864..e51add05fb8d 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c @@ -155,7 +155,8 @@ void scsi_host_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd) __blk_put_request(q, rq); spin_unlock_irqrestore(q->queue_lock, flags); - __scsi_put_command(shost, cmd, &shost->shost_gendev); + __scsi_put_command(shost, cmd); + put_device(&shost->shost_gendev); } EXPORT_SYMBOL_GPL(scsi_host_put_command); |