diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-05 18:02:09 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-24 19:56:47 +0100 |
commit | bb3ec62a179922b501535d5bd210cb8ba2ad069b (patch) | |
tree | c2f2257002aa624d23c4531a218050437c4f3b55 /drivers/scsi/scsi_lib.c | |
parent | 0f121dd85dc2128fe989da9f57dee764284689f6 (diff) | |
download | linux-bb3ec62a179922b501535d5bd210cb8ba2ad069b.tar.gz linux-bb3ec62a179922b501535d5bd210cb8ba2ad069b.tar.bz2 linux-bb3ec62a179922b501535d5bd210cb8ba2ad069b.zip |
scsi: remove scsi_next_command
There's only one caller left, so inline it and reduce the blk-mq vs !blk-mq
diff a litte bit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 994eb083fff9..2179851cdaf3 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -543,17 +543,6 @@ static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd) put_device(&sdev->sdev_gendev); } -void scsi_next_command(struct scsi_cmnd *cmd) -{ - struct scsi_device *sdev = cmd->device; - struct request_queue *q = sdev->request_queue; - - scsi_put_command(cmd); - scsi_run_queue(q); - - put_device(&sdev->sdev_gendev); -} - void scsi_run_host_queues(struct Scsi_Host *shost) { struct scsi_device *sdev; @@ -731,8 +720,6 @@ static bool scsi_end_request(struct request *req, int error, kblockd_schedule_work(&sdev->requeue_work); else blk_mq_start_stopped_hw_queues(q, true); - - put_device(&sdev->sdev_gendev); } else { unsigned long flags; @@ -744,9 +731,12 @@ static bool scsi_end_request(struct request *req, int error, spin_unlock_irqrestore(q->queue_lock, flags); scsi_release_buffers(cmd); - scsi_next_command(cmd); + + scsi_put_command(cmd); + scsi_run_queue(q); } + put_device(&sdev->sdev_gendev); return false; } |