From 8bb4682c76ff1c9a97d29fa1bfb1d12da360ffed Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 21 Jul 2023 10:27:28 -0700 Subject: [PATCH] BACKPORT: FROMGIT: scsi: Inline scsi_kick_queue() Inline scsi_kick_queue() to prepare for modifying the second argument passed to blk_mq_run_hw_queues(). Reviewed-by: Christoph Hellwig Cc: "Martin K. Petersen" Change-Id: I595673bbdd357fd27eb61e5f2605257b8c20ecd6 Signed-off-by: Bart Van Assche Reviewed-by: "Martin K. Petersen" Link: https://lore.kernel.org/r/20230721172731.955724-2-bvanassche@acm.org Signed-off-by: Jens Axboe Bug: 291379528 (cherry picked from commit b5ca9acff553874aaf1faf176e076cbd7cc4aa0e git://git.kernel.dk/linux-block for-next) Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 8f73eb5ef6ae..700c23fa324d 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -304,11 +304,6 @@ void scsi_device_unbusy(struct scsi_device *sdev, struct scsi_cmnd *cmd) cmd->budget_token = -1; } -static void scsi_kick_queue(struct request_queue *q) -{ - blk_mq_run_hw_queues(q, false); -} - /* * Called for single_lun devices on IO completion. Clear starget_sdev_user, * and call blk_run_queue for all the scsi_devices on the target - @@ -333,7 +328,7 @@ static void scsi_single_lun_run(struct scsi_device *current_sdev) * but in most cases, we will be first. Ideally, each LU on the * target would get some limited time or requests on the target. */ - scsi_kick_queue(current_sdev->request_queue); + blk_mq_run_hw_queues(current_sdev->request_queue, false); spin_lock_irqsave(shost->host_lock, flags); if (starget->starget_sdev_user) @@ -346,7 +341,7 @@ static void scsi_single_lun_run(struct scsi_device *current_sdev) continue; spin_unlock_irqrestore(shost->host_lock, flags); - scsi_kick_queue(sdev->request_queue); + blk_mq_run_hw_queues(sdev->request_queue, false); spin_lock_irqsave(shost->host_lock, flags); scsi_device_put(sdev); @@ -433,7 +428,7 @@ static void scsi_starved_list_run(struct Scsi_Host *shost) continue; spin_unlock_irqrestore(shost->host_lock, flags); - scsi_kick_queue(slq); + blk_mq_run_hw_queues(slq, false); blk_put_queue(slq); spin_lock_irqsave(shost->host_lock, flags);