On Wed 26-01-22 16:50:38, Christoph Hellwig wrote: > 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@xxxxxx> Looks good, just one nit below. Feel free to add: Reviewed-by: Jan Kara <jack@xxxxxxx> > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index 4b0058a67c48e..d9a0e2205762f 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -1758,13 +1758,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); > } Maybe worth a comment like: /* * No IO can be running at this point since there are no openers * (covers filesystems, stacked devices, AIO) and the page cache is * evicted. */ Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR