block: initialize struct block_device in bdev_alloc
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Nov 2020 14:41:40 +0000 (15:41 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Dec 2020 21:53:40 +0000 (14:53 -0700)
commite6cb53827ed60019bbbc5cf189dd204b3b0e8121
treee07a1eba916356022d4e426dc3e3051dba7eb4be
parentc64dc3bd87097e7f08b9437819440f8bfddef995
block: initialize struct block_device in bdev_alloc

Don't play tricks with slab constructors as bdev structures tends to not
get reused very much, and this makes the code a lot less error prone.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c