Skip to content

Commit

Permalink
scsi: remove scsi_next_command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig committed Nov 24, 2014
1 parent 0f121dd commit bb3ec62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
18 changes: 4 additions & 14 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/scsi_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd);
extern int scsi_maybe_unblock_host(struct scsi_device *sdev);
extern void scsi_device_unbusy(struct scsi_device *sdev);
extern void scsi_queue_insert(struct scsi_cmnd *cmd, int reason);
extern void scsi_next_command(struct scsi_cmnd *cmd);
extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
extern void scsi_run_host_queues(struct Scsi_Host *shost);
extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev);
Expand Down

0 comments on commit bb3ec62

Please sign in to comment.