]> www.infradead.org Git - users/hch/block.git/commitdiff
loop: don't freeze the queue in lo_release
authorChristoph Hellwig <hch@lst.de>
Tue, 25 Jan 2022 08:02:09 +0000 (09:02 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 28 Jan 2022 12:58:53 +0000 (13:58 +0100)
By the time the final ->release is called there can't be outstanding I/O.
For non-final ->release there is no need for driver action at all.

Thus remove the useless queue freeze.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Tested-by: Darrick J. Wong <djwong@kernel.org>
drivers/block/loop.c

index f349ddfc0e84a53b7e2aaa88c42acc46fba28cb2..1ca70f735b5bcd9e4753010e38220bf6e4d77c41 100644 (file)
@@ -1766,13 +1766,6 @@ static void lo_release(struct gendisk *disk, fmode_t mode)
                 */
                loop_schedule_rundown(lo);
                return;
-       } else if (lo->lo_state == Lo_bound) {
-               /*
-                * Otherwise keep thread (if running) and config,
-                * but flush possible ongoing bios in thread.
-                */
-               blk_mq_freeze_queue(lo->lo_queue);
-               blk_mq_unfreeze_queue(lo->lo_queue);
        }
 
 out_unlock: