]> git.baikalelectronics.ru Git - kernel.git/commit
loop: reorder loop_exit
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Jun 2021 14:59:00 +0000 (16:59 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 30 Jun 2021 21:34:13 +0000 (15:34 -0600)
commit8ab7aa5bbc016713cd6fb5a17a8ad9c481643c6c
treeefabe10cd08a438cae0f5857fe4bf838fbbad50f
parent070ff427f0d358d2438da6547747aa9d2ee9ef1d
loop: reorder loop_exit

Unregister the misc and blockdevice first to prevent further access,
and only then iterate to remove the devices.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Link: https://lore.kernel.org/r/20210623145908.92973-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c