loop: Only freeze block queue when needed.
authorMartijn Coenen <maco@android.com>
Tue, 10 Mar 2020 13:06:54 +0000 (14:06 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Mar 2020 20:10:43 +0000 (14:10 -0600)
commit0fbcf57982346763ec636f176d5afaa367b5f71b
treec4afc928ce00778cb884a6625795a949a246d904
parent7e81f99afd91c937f0e66dc135e26c1c4f78b003
loop: Only freeze block queue when needed.

__loop_update_dio() can be called as a part of loop_set_fd(), when the
block queue is not yet up and running; avoid freezing the block queue in
that case, since that is an expensive operation.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Martijn Coenen <maco@android.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c