You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
block: blk-mq: make blk_sync_queue support mq
This patch moves synchronization on mq->delay_work from blk_mq_free_queue() to blk_sync_queue(), so that blk_sync_queue can work on mq. Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
+10
-1
@@ -246,7 +246,16 @@ EXPORT_SYMBOL(blk_stop_queue);
|
|||||||
void blk_sync_queue(struct request_queue *q)
|
void blk_sync_queue(struct request_queue *q)
|
||||||
{
|
{
|
||||||
del_timer_sync(&q->timeout);
|
del_timer_sync(&q->timeout);
|
||||||
cancel_delayed_work_sync(&q->delay_work);
|
|
||||||
|
if (q->mq_ops) {
|
||||||
|
struct blk_mq_hw_ctx *hctx;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
queue_for_each_hw_ctx(q, hctx, i)
|
||||||
|
cancel_delayed_work_sync(&hctx->delayed_work);
|
||||||
|
} else {
|
||||||
|
cancel_delayed_work_sync(&q->delay_work);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(blk_sync_queue);
|
EXPORT_SYMBOL(blk_sync_queue);
|
||||||
|
|
||||||
|
|||||||
@@ -1440,7 +1440,6 @@ void blk_mq_free_queue(struct request_queue *q)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
queue_for_each_hw_ctx(q, hctx, i) {
|
queue_for_each_hw_ctx(q, hctx, i) {
|
||||||
cancel_delayed_work_sync(&hctx->delayed_work);
|
|
||||||
kfree(hctx->ctx_map);
|
kfree(hctx->ctx_map);
|
||||||
kfree(hctx->ctxs);
|
kfree(hctx->ctxs);
|
||||||
blk_mq_free_rq_map(hctx);
|
blk_mq_free_rq_map(hctx);
|
||||||
|
|||||||
Reference in New Issue
Block a user