Commit 46dc9674 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Tested-by: default avatarDarrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20220330052917.2566582-10-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 98ded54a
...@@ -1749,13 +1749,6 @@ static void lo_release(struct gendisk *disk, fmode_t mode) ...@@ -1749,13 +1749,6 @@ static void lo_release(struct gendisk *disk, fmode_t mode)
*/ */
__loop_clr_fd(lo, true); __loop_clr_fd(lo, true);
return; 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: out_unlock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment