OSDN Git Service

block: integrate bd_start_claiming into __blkdev_get
authorChristoph Hellwig <hch@lst.de>
Thu, 16 Jul 2020 14:33:10 +0000 (16:33 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 16 Jul 2020 15:35:44 +0000 (09:35 -0600)
commit5b642d8b9f2ef1212f33dfc337816e6b4ab83bb3
tree99090ed15088d80ea003c752d66ae1d1c60b8d94
parentecbe6bc0003bfd5bf8581cb679cae0eb944432cb
block: integrate bd_start_claiming into __blkdev_get

bd_start_claiming duplicates a lot of the work done in __blkdev_get.
Integrate the two functions to avoid the duplicate work, and to do the
right thing for the md -ERESTARTSYS corner case.

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