|
@@ -807,6 +807,13 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
|
|
|
int ret;
|
|
|
DEFINE_WAIT(__wait);
|
|
|
|
|
|
+ /*
|
|
|
+ * Don't leave commands partially setup because the unmap
|
|
|
+ * thread might need the blocks to make forward progress.
|
|
|
+ */
|
|
|
+ tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cur);
|
|
|
+ tcmu_cmd_reset_dbi_cur(tcmu_cmd);
|
|
|
+
|
|
|
prepare_to_wait(&udev->wait_cmdr, &__wait, TASK_INTERRUPTIBLE);
|
|
|
|
|
|
pr_debug("sleeping for ring space\n");
|