Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme-target: do not check authentication status for admin commands twice

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>

authored by

Hannes Reinecke and committed by
Keith Busch
ff4a0a40 bb2df189

-2
-2
drivers/nvme/target/admin-cmd.c
··· 1005 1005 1006 1006 if (nvme_is_fabrics(cmd)) 1007 1007 return nvmet_parse_fabrics_admin_cmd(req); 1008 - if (unlikely(!nvmet_check_auth_status(req))) 1009 - return NVME_SC_AUTH_REQUIRED | NVME_STATUS_DNR; 1010 1008 if (nvmet_is_disc_subsys(nvmet_req_subsys(req))) 1011 1009 return nvmet_parse_discovery_cmd(req); 1012 1010