diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2018-11-12 13:56:39 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-07 22:26:57 -0700 |
commit | 253928eec61a52935584777f0dfba6cdb63967b6 (patch) | |
tree | 4858d032ae648697e83ad399fdfba1ab83e6f880 /drivers/nvme/target/discovery.c | |
parent | 6a8ec0ac5ede074232137e505d4b90e56c1e4511 (diff) | |
download | lwn-253928eec61a52935584777f0dfba6cdb63967b6.tar.gz lwn-253928eec61a52935584777f0dfba6cdb63967b6.zip |
nvmet: allow host connect even if no allowed subsystems are exported
It is perfectly valid that a host connects to a discovery subsystem
and gets an empty discovery log page since no subsystems are
provisioned to it. No reason to disallow connecting to the discovery
subsystem all together.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Jay Sternberg <jay.e.sternberg@intel.com>
Reviewed-by: Phil Cayton <phil.cayton@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/discovery.c')
-rw-r--r-- | drivers/nvme/target/discovery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c index 050e4d759b65..5fbb1bb2c4fc 100644 --- a/drivers/nvme/target/discovery.c +++ b/drivers/nvme/target/discovery.c @@ -107,7 +107,7 @@ static void nvmet_execute_get_disc_log_page(struct nvmet_req *req) down_read(&nvmet_config_sem); list_for_each_entry(p, &req->port->subsystems, entry) { - if (!nvmet_host_allowed(req, p->subsys, ctrl->hostnqn)) + if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn)) continue; if (residual_len >= entry_size) { char traddr[NVMF_TRADDR_SIZE]; |