summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuixin Liu <kanie@linux.alibaba.com>2023-12-13 14:32:50 +0800
committerKeith Busch <kbusch@kernel.org>2023-12-13 14:53:33 -0800
commit4ba8b3f7d368279d3d3bde788394c7f6b3e0c061 (patch)
tree0dbaebe078e2061cf8d4c6a724c4c2d70c1e3149
parent906dbc47b1d540961a2ffddc7a095196d1a39b93 (diff)
nvmet: remove cntlid_min and cntlid_max check in nvmet_alloc_ctrl
The cntlid_min and cntlid_max are checked in configfs, don't check again in nvmet_alloc_ctrl(). Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r--drivers/nvme/target/core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 3935165048e7..d26aa30f8702 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);