Skip to content

Commit b3d8ce8

Browse files
hailan94kawasaki
authored andcommitted
blk-rq-qos: remove queue frozen from rq_qos_del()
On the one hand, nest q_usage_counter under rq_qos_mutex is wrong; On the other hand, rq_qos_del() is only called from error path of iocost/iolatency, where queue is already frozen, hence freeze queue here doesn't make sense. Signed-off-by: Yu Kuai <[email protected]> Reviewed-by: Nilay Shroff <[email protected]>
1 parent 49cacf0 commit b3d8ce8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

block/blk-rq-qos.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,10 @@ void rq_qos_del(struct rq_qos *rqos)
347347
{
348348
struct request_queue *q = rqos->disk->queue;
349349
struct rq_qos **cur;
350-
unsigned int memflags;
351350

351+
WARN_ON_ONCE(q->mq_freeze_depth == 0);
352352
lockdep_assert_held(&q->rq_qos_mutex);
353353

354-
memflags = blk_mq_freeze_queue(q);
355354
for (cur = &q->rq_qos; *cur; cur = &(*cur)->next) {
356355
if (*cur == rqos) {
357356
*cur = rqos->next;
@@ -360,5 +359,4 @@ void rq_qos_del(struct rq_qos *rqos)
360359
}
361360
if (!q->rq_qos)
362361
blk_queue_flag_clear(QUEUE_FLAG_QOS_ENABLED, q);
363-
blk_mq_unfreeze_queue(q, memflags);
364362
}

0 commit comments

Comments
 (0)