]> git.baikalelectronics.ru Git - kernel.git/commit
block: cleanup partition scanning in register_disk
authorChristoph Hellwig <hch@lst.de>
Mon, 21 Sep 2020 07:19:46 +0000 (09:19 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 23 Sep 2020 16:43:19 +0000 (10:43 -0600)
commit17f4da1f952b82250e6208fdcd796ec3518d59b2
tree2cfaa7c9ad519b65e74e6cf2a02a995b0b24c498
parentb5e6ced9c0bbfdeac5de142403cc25042e187cb4
block: cleanup partition scanning in register_disk

Use blkdev_get_by_dev instead of open coding it using bdget_disk +
blkdev_get, and split the code to read the partition table into a
separate helper to make it a little more obvious.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c