]> git.baikalelectronics.ru Git - kernel.git/commit
block: call bdev_add later in device_add_disk
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Aug 2021 14:45:34 +0000 (16:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 23 Aug 2021 18:55:45 +0000 (12:55 -0600)
commit8235b5c1e8c1c0537f03a21a2e380098bed25248
tree1441fe77e9a9d00e1c8db65513cff5297e3843b0
parent52b85909f85d06efa69aaf4210e72467f1f58d2b
block: call bdev_add later in device_add_disk

Once bdev_add is called userspace can open the block device.  Ensure
that the struct device, which is used for refcounting of the disk
besides various other things, is fully setup at that point.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20210818144542.19305-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c