summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_tgt_lib.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2014-02-20 14:20:55 -0800
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 10:19:24 -0700
commit0479633686d370303e3430256ace4bd5f7f138dc (patch)
tree8315562a82e4c64712d2d8ee423be2f346aa27c5 /drivers/scsi/scsi_tgt_lib.c
parent21a05df547dd0ac532d3a89e241dc504018eb881 (diff)
[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.c3
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);