]> www.infradead.org Git - users/hch/block.git/commitdiff
block: move rq_qos_exit() into disk_release() freeze-5.18
authorMing Lei <ming.lei@redhat.com>
Tue, 1 Mar 2022 12:27:28 +0000 (14:27 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 8 Mar 2022 05:28:31 +0000 (06:28 +0100)
Keep all teardown of file system I/O related functionality in one place.
There can't be file system I/O in disk_release(), so it is safe to move
rq_qos_exit() there.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
block/genhd.c

index 857e0a54da7dd149d32b0154a3dc890b87d361b2..56f66c6fee943360a0f144927c2a7d5e161ab35c 100644 (file)
@@ -627,7 +627,6 @@ void del_gendisk(struct gendisk *disk)
 
        blk_mq_freeze_queue_wait(q);
 
-       rq_qos_exit(q);
        blk_sync_queue(q);
        blk_flush_integrity();
        /*
@@ -1119,7 +1118,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);
 }