block: allocate bd_meta_info later in add_partitions
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Jul 2021 07:53:57 +0000 (09:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Aug 2021 19:37:28 +0000 (13:37 -0600)
commit0468c5323413c6903e4cbcef841a55e6c5578cd2
tree4efff9ecf71aa0b930a85a03ed80648fe0e8ecf3
parentd7a66574b34e0b354442140927f9b787efccabfd
block: allocate bd_meta_info later in add_partitions

Move the allocation of bd_meta_info after initializing the struct device
to avoid the special bdput error handling path.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210722075402.983367-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c