summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2022-11-13 13:24:21 +0200
committerChristoph Hellwig <hch@lst.de>2022-11-16 08:36:36 +0100
commita2a00d2a66e480c8b225012db538dca6e389a92d (patch)
treec1d695e69021de3406d60020244a5228e6fc840b /drivers/nvme
parentaa36d711e945e65fa87410927800f01878a8faed (diff)
downloadlwn-a2a00d2a66e480c8b225012db538dca6e389a92d.tar.gz
lwn-a2a00d2a66e480c8b225012db538dca6e389a92d.zip
nvme-auth: remove redundant auth_work flush
only ctrl deletion calls nvme_auth_free, which was stopped prior in the teardown stage, so there is no possibility that it should ever run when nvme_auth_free is called. As a result, we can remove a local chap pointer variable. Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/auth.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index 24726683d4bc..c9b3f0056afc 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -989,15 +989,11 @@ EXPORT_SYMBOL_GPL(nvme_auth_stop);
void nvme_auth_free(struct nvme_ctrl *ctrl)
{
- struct nvme_dhchap_queue_context *chap;
int i;
if (ctrl->dhchap_ctxs) {
- for (i = 0; i < ctrl_max_dhchaps(ctrl); i++) {
- chap = &ctrl->dhchap_ctxs[i];
- flush_work(&chap->auth_work);
- nvme_auth_free_dhchap(chap);
- }
+ for (i = 0; i < ctrl_max_dhchaps(ctrl); i++)
+ nvme_auth_free_dhchap(&ctrl->dhchap_ctxs[i]);
kfree(ctrl->dhchap_ctxs);
}
if (ctrl->host_key) {