mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
blk-mq: remove WARN_ON(!q->elevator) from blk_mq_sched_free_requests
blk_mq_sched_free_requests() may be called in failure path in which
q->elevator may not be setup yet, so remove WARN_ON(!q->elevator) from
blk_mq_sched_free_requests for avoiding the false positive.
This function is actually safe to call in case of !q->elevator because
hctx->sched_tags is checked.
Cc: Bart Van Assche <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Yi Zhang <[email protected]>
Fixes: c3e2219216 ("block: free sched's request pool in blk_cleanup_queue")
Reported-by: [email protected]
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
fb5772cbfe
commit
c326f846eb
1 file changed
-1
@@ -555,7 +555,6 @@ void blk_mq_sched_free_requests(struct request_queue *q)
|
||||
int i;
|
||||
|
||||
lockdep_assert_held(&q->sysfs_lock);
|
||||
WARN_ON(!q->elevator);
|
||||
|
||||
queue_for_each_hw_ctx(q, hctx, i) {
|
||||
if (hctx->sched_tags)
|
||||
|
||||
Reference in new issue
Block a user