]> www.infradead.org Git - users/hch/block.git/commitdiff
nvme-target: do not check authentication status for admin commands twice
authorHannes Reinecke <hare@kernel.org>
Mon, 22 Jul 2024 12:02:26 +0000 (14:02 +0200)
committerKeith Busch <kbusch@kernel.org>
Thu, 22 Aug 2024 20:25:11 +0000 (13:25 -0700)
nvmet_check_ctrl_status() checks the authentication status, so
we don't need to do that prior to calling it.

Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/admin-cmd.c

index f7e1156ac7ecc8aafc5a2bcfc526062e8bff3efa..d64480f01f4a8d4610871b2038088aa08e4b9fed 100644 (file)
@@ -1005,8 +1005,6 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req)
 
        if (nvme_is_fabrics(cmd))
                return nvmet_parse_fabrics_admin_cmd(req);
-       if (unlikely(!nvmet_check_auth_status(req)))
-               return NVME_SC_AUTH_REQUIRED | NVME_STATUS_DNR;
        if (nvmet_is_disc_subsys(nvmet_req_subsys(req)))
                return nvmet_parse_discovery_cmd(req);