]> git.baikalelectronics.ru Git - kernel.git/commit
block: use bd_prepare_to_claim directly in the loop driver
authorChristoph Hellwig <hch@lst.de>
Thu, 16 Jul 2020 14:33:09 +0000 (16:33 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 16 Jul 2020 15:35:44 +0000 (09:35 -0600)
commit346437074043424ed7845f123f3349bc2ed58dd8
tree5006b0a7baecfb91cdcdb8ccc8a033e6ba02ba49
parent9724e80b68a41858590b5b51016b3539802aa6a6
block: use bd_prepare_to_claim directly in the loop driver

The arcane magic in bd_start_claiming is only needed to be able to claim
a block_device that hasn't been fully set up.  Switch the loop driver
that claims from the ioctl path with a fully set up struct block_device
to just use the much simpler bd_prepare_to_claim directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c
fs/block_dev.c
include/linux/blkdev.h