Skip to content

Commit 616add7

Browse files
shifteekeithbusch
authored andcommitted
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>
1 parent 37d9486 commit 616add7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)