lkml.org 
[lkml]   [2013]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] blk-mq: fix blk_mq_start_stopped_hw_queues from irq context
The only caller of blk_mq_start_stopped_hw_queues is in irq context,
leading to lockdep splat when it actually gets called. Fix this by
deferring the hw queue run to workqueue context.

Signed-off-by: Christoph Hellwig <hch@lst.de>

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 2b85029..923e9e1 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -686,7 +686,8 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q)
if (!test_bit(BLK_MQ_S_STOPPED, &hctx->state))
continue;

- blk_mq_start_hw_queue(hctx);
+ clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
+ blk_mq_run_hw_queue(hctx, true);
}
}
EXPORT_SYMBOL(blk_mq_start_stopped_hw_queues);

\
 
 \ /
  Last update: 2013-10-06 19:21    [W:0.288 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site