Skip to content

Commit

Permalink
nvme-fabrics: remove unnecessary controller subnqn validation
Browse files Browse the repository at this point in the history
After creating the nvme controller, nvmf_create_ctrl() validates
the newly created subsysnqn vs the one specified by the options.

In general, this is an unnecessary check as the Connect message
should implicitly ensure this value matches.

With the change to the FC transport to do an asynchronous connect
for the first association create, the transport will return to
nvmf_create_ctrl() before that first association has been established,
thus the subnqn will not yet be set.

Remove the unnecessary validation.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
James Smart authored and Christoph Hellwig committed May 25, 2018
1 parent 90fcaf5 commit ffecb0b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/nvme/host/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,16 +983,6 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
goto out_module_put;
}

if (strcmp(ctrl->subsys->subnqn, opts->subsysnqn)) {
dev_warn(ctrl->device,
"controller returned incorrect NQN: \"%s\".\n",
ctrl->subsys->subnqn);
module_put(ops->module);
up_read(&nvmf_transports_rwsem);
nvme_delete_ctrl_sync(ctrl);
return ERR_PTR(-EINVAL);
}

module_put(ops->module);
up_read(&nvmf_transports_rwsem);
return ctrl;
Expand Down

0 comments on commit ffecb0b

Please sign in to comment.