loop: only freeze the queue in __loop_clr_fd when needed
authorChristoph Hellwig <hch@lst.de>
Wed, 30 Mar 2022 05:29:12 +0000 (07:29 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 12:54:09 +0000 (06:54 -0600)
commit1fe0b1acb14dd3113b7dc975a118cd7f08af8316
treeeba2ed9c53de94888bb004718adc48baf04565fe
parent46dc967445bde5300eee7e567a67796de2217586
loop: only freeze the queue in __loop_clr_fd when needed

->release is only called after all outstanding I/O has completed, so only
freeze the queue when clearing the backing file of a live loop device.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Tested-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20220330052917.2566582-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c