nvme-core: remove redundant check from nvme_init_ns_head
authorIrvin Cote <irvincoteg@gmail.com>
Wed, 17 May 2023 22:09:15 +0000 (19:09 -0300)
committerKeith Busch <kbusch@kernel.org>
Mon, 12 Jun 2023 17:36:59 +0000 (10:36 -0700)
nvme_find_ns_head already checks that the list of namescpaces
in an already existing namespace head is not empty

Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c

index 43b906a..3263af1 100644 (file)
@@ -3563,7 +3563,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info)
                        goto out_put_ns_head;
                }
 
-               if (!multipath && !list_empty(&head->list)) {
+               if (!multipath) {
                        dev_warn(ctrl->device,
                                "Found shared namespace %d, but multipathing not supported.\n",
                                info->nsid);