]> www.infradead.org Git - users/hch/block.git/commitdiff
block: move rq_qos_exit() into disk_release() freeze-for-next
authorMing Lei <ming.lei@redhat.com>
Tue, 1 Mar 2022 12:27:28 +0000 (14:27 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 2 Mar 2022 14:44:56 +0000 (16:44 +0200)
There can't be FS IO in disk_release(), so it is safe to move rq_qos_exit()
there.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
block/genhd.c

index ec4c5e9c98a1e375fc12a429ba44ff36381087ee..56aa2a459fedb0e8bf303aa3a13ba1b0802087ee 100644 (file)
@@ -641,7 +641,6 @@ void del_gendisk(struct gendisk *disk)
 
        blk_mq_freeze_queue_wait(q);
 
-       rq_qos_exit(q);
        blk_sync_queue(q);
        blk_flush_integrity();
        /*
@@ -1133,7 +1132,7 @@ static void disk_release_mq(struct request_queue *q)
                elevator_exit(q);
                mutex_unlock(&q->sysfs_lock);
        }
-
+       rq_qos_exit(q);
        __blk_mq_unfreeze_queue(q, true);
 }