diff options
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_util.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index a05ca1c4f01c..11287e1ece13 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c | |||
@@ -849,6 +849,17 @@ void iscsit_free_cmd(struct iscsi_cmd *cmd) | |||
849 | case ISCSI_OP_SCSI_TMFUNC: | 849 | case ISCSI_OP_SCSI_TMFUNC: |
850 | transport_generic_free_cmd(&cmd->se_cmd, 1); | 850 | transport_generic_free_cmd(&cmd->se_cmd, 1); |
851 | break; | 851 | break; |
852 | case ISCSI_OP_REJECT: | ||
853 | /* | ||
854 | * Handle special case for REJECT when iscsi_add_reject*() has | ||
855 | * overwritten the original iscsi_opcode assignment, and the | ||
856 | * associated cmd->se_cmd needs to be released. | ||
857 | */ | ||
858 | if (cmd->se_cmd.se_tfo != NULL) { | ||
859 | transport_generic_free_cmd(&cmd->se_cmd, 1); | ||
860 | break; | ||
861 | } | ||
862 | /* Fall-through */ | ||
852 | default: | 863 | default: |
853 | iscsit_release_cmd(cmd); | 864 | iscsit_release_cmd(cmd); |
854 | break; | 865 | break; |