aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_user.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-11-08 11:44:15 +0300
committerNicholas Bellinger <nab@linux-iscsi.org>2017-11-08 01:42:35 -0800
commit97488c73190bb785cba818bf31e7361a27aded41 (patch)
treefe9e16a9f0aa7a635d62be56acf16a8a54f22c90 /drivers/target/target_core_user.c
parent16b932770417b1bc304d87c48aa0bb8a3c1164e1 (diff)
tcmu: Add a missing unlock on an error path
We added a new error path here but we forgot to drop the lock first before returning. Fixes: 0d44374c1aae ("tcmu: fix double se_cmd completion") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_user.c')
-rw-r--r--drivers/target/target_core_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index d2b8d5ccb446..bf4fd40dde2b 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -888,6 +888,7 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
ret = tcmu_setup_cmd_timer(tcmu_cmd);
if (ret) {
tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cnt);
+ mutex_unlock(&udev->cmdr_lock);
return TCM_OUT_OF_RESOURCES;
}
entry->hdr.cmd_id = tcmu_cmd->cmd_id;

Privacy Policy