summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2022-11-13 13:24:20 +0200
committerChristoph Hellwig <hch@lst.de>2022-11-16 08:36:36 +0100
commitaa36d711e945e65fa87410927800f01878a8faed (patch)
tree308d2023e10db00934cc1a631f20951829b38906 /drivers/nvme/host/nvme.h
parent546dea18c99928bb81392de63092da0e25d07b10 (diff)
nvme-auth: convert dhchap_auth_list to an array
We know exactly how many dhchap contexts we will need, there is no need to hold a list that we need to protect with a mutex. Convert to a dynamically allocated array. And dhchap_context access state is maintained by the chap itself. Make dhchap_auth_mutex protect only the ctrl host_key and ctrl_key in a fine-grained lock such that there is no long lasting acquisition of the lock and no need to take/release this lock when flushing authentication works. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index e431ec348d52..ef23c6c6e2a3 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -337,8 +337,8 @@ struct nvme_ctrl {
#ifdef CONFIG_NVME_AUTH
struct work_struct dhchap_auth_work;
- struct list_head dhchap_auth_list;
struct mutex dhchap_auth_mutex;
+ struct nvme_dhchap_queue_context *dhchap_ctxs;
struct nvme_dhchap_key *host_key;
struct nvme_dhchap_key *ctrl_key;
u16 transaction;