nvmet: fix the return error code of target if host is not allowed
authorGuan Junxiong <guanjunxiong@huawei.com>
Fri, 4 Aug 2017 09:27:47 +0000 (17:27 +0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 28 Aug 2017 19:38:20 +0000 (21:38 +0200)
commit130c24b5be80512be973e3a614abda75f5896b42
tree7d9650b58e3aa5a702c39db123422356471eeb67
parent1645d5036f9201bd0925aff099fa92fbe7afaff4
nvmet: fix the return error code of target if host is not allowed

nvmf target shall return NVME_SC_CONNECT_INVALID_HOST instead of
the gereal code INVALID_PARAM when the given host nqn is not allowed
to connect. Refer to the 2.2.1 section of the NVMe over Fabrics Spec.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/core.c