From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch updates iscsit_handle_scsi_cmd() to handle transport_generic_new_cmd() failures using iscsit_add_reject_from_cmd(), and updates the comment. Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/target/iscsi/iscsi_target.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 8dedfbf..6ebc247 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -1162,13 +1162,11 @@ attach_cmd: goto after_immediate_data; } /* - * Call into transport_generic_handle_cdb() that now translates - * into a direct transport_generic_new_cmd() call with a NULL - * se_cmd->se_tfo->new_cmd_map() pointer. + * Call directly into transport_generic_new_cmd() to perform + * the backend memory allocation. */ - transport_generic_new_cmd(SE_CMD(cmd)); - - if (SE_CMD(cmd)->se_cmd_flags & SCF_SE_CMD_FAILED) { + ret = transport_generic_new_cmd(&cmd->se_cmd); + if ((ret < 0) || (SE_CMD(cmd)->se_cmd_flags & SCF_SE_CMD_FAILED)) { immed_ret = IMMEDIATE_DATA_NORMAL_OPERATION; dump_immediate_data = 1; goto after_immediate_data; -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html