diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-11-08 03:44:15 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2017-11-08 04:42:35 -0500 |
commit | 97488c73190bb785cba818bf31e7361a27aded41 (patch) | |
tree | fe9e16a9f0aa7a635d62be56acf16a8a54f22c90 /drivers | |
parent | 16b932770417b1bc304d87c48aa0bb8a3c1164e1 (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')
-rw-r--r-- | drivers/target/target_core_user.c | 1 |
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) | |||
888 | ret = tcmu_setup_cmd_timer(tcmu_cmd); | 888 | ret = tcmu_setup_cmd_timer(tcmu_cmd); |
889 | if (ret) { | 889 | if (ret) { |
890 | tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cnt); | 890 | tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cnt); |
891 | mutex_unlock(&udev->cmdr_lock); | ||
891 | return TCM_OUT_OF_RESOURCES; | 892 | return TCM_OUT_OF_RESOURCES; |
892 | } | 893 | } |
893 | entry->hdr.cmd_id = tcmu_cmd->cmd_id; | 894 | entry->hdr.cmd_id = tcmu_cmd->cmd_id; |