Skip to content

Commit

Permalink
blk-mq: fix regression from commit 624dbe4
Browse files Browse the repository at this point in the history
When the code was collapsed to avoid duplication, the recent patch
for ensuring that a queue is idled before free was dropped, which was
added by commit 19c5d84.

Add back the blk_mq_tag_idle(), to ensure we don't leak a reference
to an active queue when it is freed.

Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Jens Axboe committed Jun 4, 2014
1 parent ff87bce commit f899fed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,8 @@ static void blk_mq_exit_hw_queues(struct request_queue *q,
if (i == nr_queue)
break;

blk_mq_tag_idle(hctx);

if (set->ops->exit_hctx)
set->ops->exit_hctx(hctx, i);

Expand Down

0 comments on commit f899fed

Please sign in to comment.