diff options
| author | Christoph Hellwig <hch@lst.de> | 2014-09-05 21:02:09 -0400 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2014-11-24 13:56:47 -0500 |
| commit | bb3ec62a179922b501535d5bd210cb8ba2ad069b (patch) | |
| tree | c2f2257002aa624d23c4531a218050437c4f3b55 | |
| parent | 0f121dd85dc2128fe989da9f57dee764284689f6 (diff) | |
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>
| -rw-r--r-- | drivers/scsi/scsi_lib.c | 18 | ||||
| -rw-r--r-- | drivers/scsi/scsi_priv.h | 1 |
2 files changed, 4 insertions, 15 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) | |||
| 543 | put_device(&sdev->sdev_gendev); | 543 | put_device(&sdev->sdev_gendev); |
| 544 | } | 544 | } |
| 545 | 545 | ||
| 546 | void scsi_next_command(struct scsi_cmnd *cmd) | ||
| 547 | { | ||
| 548 | struct scsi_device *sdev = cmd->device; | ||
| 549 | struct request_queue *q = sdev->request_queue; | ||
| 550 | |||
| 551 | scsi_put_command(cmd); | ||
| 552 | scsi_run_queue(q); | ||
| 553 | |||
| 554 | put_device(&sdev->sdev_gendev); | ||
| 555 | } | ||
| 556 | |||
| 557 | void scsi_run_host_queues(struct Scsi_Host *shost) | 546 | void scsi_run_host_queues(struct Scsi_Host *shost) |
| 558 | { | 547 | { |
| 559 | struct scsi_device *sdev; | 548 | struct scsi_device *sdev; |
| @@ -731,8 +720,6 @@ static bool scsi_end_request(struct request *req, int error, | |||
| 731 | kblockd_schedule_work(&sdev->requeue_work); | 720 | kblockd_schedule_work(&sdev->requeue_work); |
| 732 | else | 721 | else |
| 733 | blk_mq_start_stopped_hw_queues(q, true); | 722 | blk_mq_start_stopped_hw_queues(q, true); |
| 734 | |||
| 735 | put_device(&sdev->sdev_gendev); | ||
| 736 | } else { | 723 | } else { |
| 737 | unsigned long flags; | 724 | unsigned long flags; |
| 738 | 725 | ||
| @@ -744,9 +731,12 @@ static bool scsi_end_request(struct request *req, int error, | |||
| 744 | spin_unlock_irqrestore(q->queue_lock, flags); | 731 | spin_unlock_irqrestore(q->queue_lock, flags); |
| 745 | 732 | ||
| 746 | scsi_release_buffers(cmd); | 733 | scsi_release_buffers(cmd); |
| 747 | scsi_next_command(cmd); | 734 | |
| 735 | scsi_put_command(cmd); | ||
| 736 | scsi_run_queue(q); | ||
| 748 | } | 737 | } |
| 749 | 738 | ||
| 739 | put_device(&sdev->sdev_gendev); | ||
| 750 | return false; | 740 | return false; |
| 751 | } | 741 | } |
| 752 | 742 | ||
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 12b8e1bee7f0..2a382c100760 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h | |||
| @@ -84,7 +84,6 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd); | |||
| 84 | extern int scsi_maybe_unblock_host(struct scsi_device *sdev); | 84 | extern int scsi_maybe_unblock_host(struct scsi_device *sdev); |
| 85 | extern void scsi_device_unbusy(struct scsi_device *sdev); | 85 | extern void scsi_device_unbusy(struct scsi_device *sdev); |
| 86 | extern void scsi_queue_insert(struct scsi_cmnd *cmd, int reason); | 86 | extern void scsi_queue_insert(struct scsi_cmnd *cmd, int reason); |
| 87 | extern void scsi_next_command(struct scsi_cmnd *cmd); | ||
| 88 | extern void scsi_io_completion(struct scsi_cmnd *, unsigned int); | 87 | extern void scsi_io_completion(struct scsi_cmnd *, unsigned int); |
| 89 | extern void scsi_run_host_queues(struct Scsi_Host *shost); | 88 | extern void scsi_run_host_queues(struct Scsi_Host *shost); |
| 90 | extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev); | 89 | extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev); |
