summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-26 13:18:01 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 06:41:29 -0700
commitb84ba30b6c7a75babdf73b83bc3c7b59b944501a (patch)
treedd68d03efb1ebe9a4cc31c9ae957e2531d061536 /block/blk-mq.c
parentf3fa33acca9f0058157214800f68b10d8e71ab7a (diff)
block: remove the gendisk argument to blk_execute_rq
Remove the gendisk aregument to blk_execute_rq and blk_execute_rq_nowait given that it is unused now. Also convert the boolean at_head parameter to actually use the bool type while touching the prototype. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20211126121802.2090656-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index f1abfd2e24f7..ecfc47fad236 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1153,7 +1153,6 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error)
/**
* blk_execute_rq_nowait - insert a request to I/O scheduler for execution
- * @bd_disk: matching gendisk
* @rq: request to insert
* @at_head: insert request at head or tail of queue
* @done: I/O completion handler
@@ -1165,8 +1164,7 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error)
* Note:
* This function will invoke @done directly if the queue is dead.
*/
-void blk_execute_rq_nowait(struct gendisk *bd_disk, struct request *rq,
- int at_head, rq_end_io_fn *done)
+void blk_execute_rq_nowait(struct request *rq, bool at_head, rq_end_io_fn *done)
{
WARN_ON(irqs_disabled());
WARN_ON(!blk_rq_is_passthrough(rq));
@@ -1204,7 +1202,6 @@ static void blk_rq_poll_completion(struct request *rq, struct completion *wait)
/**
* blk_execute_rq - insert a request into queue for execution
- * @bd_disk: matching gendisk
* @rq: request to insert
* @at_head: insert request at head or tail of queue
*
@@ -1213,14 +1210,13 @@ static void blk_rq_poll_completion(struct request *rq, struct completion *wait)
* for execution and wait for completion.
* Return: The blk_status_t result provided to blk_mq_end_request().
*/
-blk_status_t blk_execute_rq(struct gendisk *bd_disk, struct request *rq,
- int at_head)
+blk_status_t blk_execute_rq(struct request *rq, bool at_head)
{
DECLARE_COMPLETION_ONSTACK(wait);
unsigned long hang_check;
rq->end_io_data = &wait;
- blk_execute_rq_nowait(bd_disk, rq, at_head, blk_end_sync_rq);
+ blk_execute_rq_nowait(rq, at_head, blk_end_sync_rq);
/* Prevent hang_check timer from firing at us during very long I/O */
hang_check = sysctl_hung_task_timeout_secs;