[PATCH 3/5] nvmet: remove cntlid_min and cntlid_max check in nvmet_alloc_ctrl
Guixin Liu
kanie at linux.alibaba.com
Tue Dec 12 22:32:50 PST 2023
The cntlid_min and cntlid_max are checked in configfs, don't check
again in nvmet_alloc_ctrl().
Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
drivers/nvme/target/core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 3935165..d26aa30 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1425,9 +1425,6 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
if (!ctrl->sqs)
goto out_free_changed_ns_list;
- if (subsys->cntlid_min > subsys->cntlid_max)
- goto out_free_sqs;
-
ret = ida_alloc_range(&cntlid_ida,
subsys->cntlid_min, subsys->cntlid_max,
GFP_KERNEL);
--
1.8.3.1
More information about the Linux-nvme
mailing list