nvme: check for duplicate identifiers earlier
authorChristoph Hellwig <hch@lst.de>
Thu, 24 Feb 2022 16:46:50 +0000 (17:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:12 +0000 (17:25 +0200)
commit321abf90c5768093f275e93c09b75c2f670f64f4
tree6ffa59c52ccf5ab65825e5fee5dafbb941bbd7e6
parentdbedad96f416495b446dbb4348856a4a6fa52b85
nvme: check for duplicate identifiers earlier

[ Upstream commit e2d77d2e11c4f1e70a1a24cc8fe63ff3dc9b53ef ]

Lift the check for duplicate identifiers into nvme_init_ns_head, which
avoids pointless error unwinding in case they don't match, and also
matches where we check identifier validity for the multipath case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c