From: Christoph Hellwig Date: Tue, 25 Jan 2022 08:02:09 +0000 (+0100) Subject: loop: don't freeze the queue in lo_release X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b2dae6e394d133385db288e3da137f9e84f96663;p=users%2Fhch%2Fblock.git loop: don't freeze the queue in lo_release 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 Reviewed-by: Jan Kara Tested-by: Darrick J. Wong --- diff --git a/drivers/block/loop.c b/drivers/block/loop.c index f349ddfc0e84..1ca70f735b5b 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -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: