[PATCH 13/16] nvme-auth: remove redundant auth_work flush

Sagi Grimberg sagi at grimberg.me
Tue Nov 8 19:44:16 PST 2022


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.

Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/auth.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index b78e0df54f6c..0159179c2455 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -988,10 +988,8 @@ void nvme_auth_free(struct nvme_ctrl *ctrl)
 	struct nvme_dhchap_queue_context *chap;
 	int i;
 
-	nvme_foreach_dhchap(i, chap, ctrl) {
-		flush_work(&chap->auth_work);
+	nvme_foreach_dhchap(i, chap, ctrl)
 		nvme_auth_free_dhchap(chap);
-	}
 	if (ctrl->host_key) {
 		nvme_auth_free_key(ctrl->host_key);
 		ctrl->host_key = NULL;
-- 
2.34.1




More information about the Linux-nvme mailing list