Skip to content

Commit 616add7

Browse files
shifteekeithbusch
authored andcommitted
nvme-auth: unlock mutex in one place only
Signed-off-by: Mark O'Donovan <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 37d9486 commit 616add7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/nvme/host/auth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,12 +757,11 @@ static void nvme_queue_auth_work(struct work_struct *work)
757757
__func__, chap->qid);
758758
mutex_lock(&ctrl->dhchap_auth_mutex);
759759
ret = nvme_auth_dhchap_setup_host_response(ctrl, chap);
760+
mutex_unlock(&ctrl->dhchap_auth_mutex);
760761
if (ret) {
761-
mutex_unlock(&ctrl->dhchap_auth_mutex);
762762
chap->error = ret;
763763
goto fail2;
764764
}
765-
mutex_unlock(&ctrl->dhchap_auth_mutex);
766765

767766
/* DH-HMAC-CHAP Step 3: send reply */
768767
dev_dbg(ctrl->device, "%s: qid %d send reply\n",

0 commit comments

Comments
 (0)