iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 28 Oct 2011 20:32:35 +0000 (13:32 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 2 Nov 2011 15:57:12 +0000 (15:57 +0000)
This patch adds a missing CMDSN_LOWER_THAN_EXP return check for
iscsit_sequence_cmd() in iscsit_handle_scsi_cmd() that was incorrectly
dropped during the v3.1-rc cleanups to use iscsit_sequence_cmd().

Cc: Andy Grover <agrover@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c

index 4d01768fcd90f1483ac0e8d9819ad992b8a46232..7855a63d49fcbb457f4ae0cee794f81bb1801336 100644 (file)
@@ -1079,7 +1079,9 @@ attach_cmd:
         */
        if (!cmd->immediate_data) {
                cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn);
-               if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER)
+               if (cmdsn_ret == CMDSN_LOWER_THAN_EXP)
+                       return 0;
+               else if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER)
                        return iscsit_add_reject_from_cmd(
                                ISCSI_REASON_PROTOCOL_ERROR,
                                1, 0, buf, cmd);