[PATCH 4/7] iscsi-target: Handle transport_generic_new_cmd failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux