nvme: check for duplicate identifiers earlier
authorChristoph Hellwig <hch@lst.de>
Thu, 24 Feb 2022 16:46:50 +0000 (17:46 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 28 Feb 2022 11:45:07 +0000 (13:45 +0200)
commite2d77d2e11c4f1e70a1a24cc8fe63ff3dc9b53ef
treeb94faeb1aafee5d515978cd3eb371cb1e9f6199b
parente2724cb9f0c406b8fb66efd3aa9e8b3edfd8d5c8
nvme: check for duplicate identifiers earlier

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>
drivers/nvme/host/core.c