md: simplify md_open
authorChristoph Hellwig <hch@lst.de>
Tue, 19 Jul 2022 09:18:24 +0000 (11:18 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:46 +0000 (17:22 -0600)
commit5b26804bb0af5d4e4f3440b484244d478d60f16b
tree2f5e5522265d248400b8518b91561fb811223e19
parent12a6caf273240ae42842de8cc05feaa86e582d61
md: simplify md_open

Now that devices are on the all_mddevs list until the gendisk is freed,
there can't be any duplicates.  Remove the global list lookup and just
grab a reference.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c