aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark O'Donovan <shiftee@posteo.net>2023-10-11 08:45:11 +0000
committerKeith Busch <kbusch@kernel.org>2023-11-20 09:25:13 -0800
commit616add70bfdc0274a253e84fc78155c27aacde91 (patch)
tree8b7dd9d1ca51468bb3e88bc58bc745d88c89be3d
parent37d9486874ec925fa298bcd7ba628a9b206e812f (diff)
downloadlibata-616add70bfdc0274a253e84fc78155c27aacde91.tar.gz
nvme-auth: unlock mutex in one place only
Signed-off-by: Mark O'Donovan <shiftee@posteo.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r--drivers/nvme/host/auth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index 48328e36e93bc4..0f5ea63d3c8d2e 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -757,12 +757,11 @@ static void nvme_queue_auth_work(struct work_struct *work)
__func__, chap->qid);
mutex_lock(&ctrl->dhchap_auth_mutex);
ret = nvme_auth_dhchap_setup_host_response(ctrl, chap);
+ mutex_unlock(&ctrl->dhchap_auth_mutex);
if (ret) {
- mutex_unlock(&ctrl->dhchap_auth_mutex);
chap->error = ret;
goto fail2;
}
- mutex_unlock(&ctrl->dhchap_auth_mutex);
/* DH-HMAC-CHAP Step 3: send reply */
dev_dbg(ctrl->device, "%s: qid %d send reply\n",