On 04/03/2014 16:44, Sagi Grimberg wrote:
@@ -1707,10 +1707,17 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
                                goto prepd_fault;
                        }
                }
-               if (session->tt->xmit_task(task)) {
-                       session->cmdsn--;
-                       reason = FAILURE_SESSION_NOT_READY;
-                       goto prepd_reject;
+
+               reason = session->tt->xmit_task(task);
+               if (reason) {
+                       if (reason == -ENOMEM || reason == -EAGAIN) {
+                               session->cmdsn--;

I am pretty sure this has to be done anyway, no matter why the xmit_task callback failed

Even if we abort? this just follows the same logic as iscsi_prep_scsi_cmd_pdu error flow.

yes, take a 2nd look on iscsi_prep_scsi_cmd_pdu and you'll see that all the possible error cases take place **before** session->cmdsn is incremented
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to