hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/block/blk-exec.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Functions related to setting various queue properties from drivers
34 */
....@@ -48,35 +49,19 @@
4849 struct request *rq, int at_head,
4950 rq_end_io_fn *done)
5051 {
51
- int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
52
-
5352 WARN_ON(irqs_disabled());
5453 WARN_ON(!blk_rq_is_passthrough(rq));
5554
5655 rq->rq_disk = bd_disk;
5756 rq->end_io = done;
5857
58
+ blk_account_io_start(rq);
59
+
5960 /*
6061 * don't check dying flag for MQ because the request won't
6162 * be reused after dying flag is set
6263 */
63
- if (q->mq_ops) {
64
- blk_mq_sched_insert_request(rq, at_head, true, false);
65
- return;
66
- }
67
-
68
- spin_lock_irq(q->queue_lock);
69
-
70
- if (unlikely(blk_queue_dying(q))) {
71
- rq->rq_flags |= RQF_QUIET;
72
- __blk_end_request_all(rq, BLK_STS_IOERR);
73
- spin_unlock_irq(q->queue_lock);
74
- return;
75
- }
76
-
77
- __elv_add_request(q, rq, where);
78
- __blk_run_queue(q);
79
- spin_unlock_irq(q->queue_lock);
64
+ blk_mq_sched_insert_request(rq, at_head, true, false);
8065 }
8166 EXPORT_SYMBOL_GPL(blk_execute_rq_nowait);
8267