提交 ac88c36a 编写于 作者: M Matthew Wilcox

NVMe: Fix interpretation of 'Number of Namespaces' field

The spec says this is a 0s based value.  We don't need to handle the
maximal value because it's reserved to mean "every namespace".
Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
上级 19e899b2
......@@ -1364,7 +1364,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
crt.features.prp1 = cpu_to_le64(dma_addr + 4096);
crt.features.fid = cpu_to_le32(NVME_FEAT_LBA_RANGE);
for (i = 0; i < nn; i++) {
for (i = 0; i <= nn; i++) {
cid.identify.nsid = cpu_to_le32(i);
res = nvme_submit_admin_cmd(dev, &cid, NULL);
if (res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册