aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-07-08 15:58:42 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-16 20:35:18 -0400
commit67441b68fa73af1c578ccc1d85671b163a7adc13 (patch)
treef1694cf3530b0e2eab50faacd2cc0d845957f6dc /drivers/target
parentc3196f0cf0061ae62660b3d9a6ce736bef817aba (diff)
iscsit: use target_execute_cmd for WRITEs
All three callers of transport_generic_handle_data are from user context and can use target_execute_cmd directly to handle the backend I/O submission of WRITE I/O. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target.c6
-rw-r--r--drivers/target/iscsi/iscsi_target_erl1.c4
-rw-r--r--drivers/target/iscsi/iscsi_target_tmr.c3
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index d57d10cb2e47..0aa04a0b91de 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1413,8 +1413,10 @@ static int iscsit_handle_data_out(struct iscsi_conn *conn, unsigned char *buf)
1413 spin_unlock_bh(&cmd->istate_lock); 1413 spin_unlock_bh(&cmd->istate_lock);
1414 1414
1415 iscsit_stop_dataout_timer(cmd); 1415 iscsit_stop_dataout_timer(cmd);
1416 return (!ooo_cmdsn) ? transport_generic_handle_data( 1416 if (ooo_cmdsn)
1417 &cmd->se_cmd) : 0; 1417 return 0;
1418 target_execute_cmd(&cmd->se_cmd);
1419 return 0;
1418 } else /* DATAOUT_CANNOT_RECOVER */ 1420 } else /* DATAOUT_CANNOT_RECOVER */
1419 return -1; 1421 return -1;
1420 1422
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index ecdd46deedda..3df8a2cef86f 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -965,8 +965,8 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
965 if (cmd->immediate_data) { 965 if (cmd->immediate_data) {
966 if (cmd->cmd_flags & ICF_GOT_LAST_DATAOUT) { 966 if (cmd->cmd_flags & ICF_GOT_LAST_DATAOUT) {
967 spin_unlock_bh(&cmd->istate_lock); 967 spin_unlock_bh(&cmd->istate_lock);
968 return transport_generic_handle_data( 968 target_execute_cmd(&cmd->se_cmd);
969 &cmd->se_cmd); 969 return 0;
970 } 970 }
971 spin_unlock_bh(&cmd->istate_lock); 971 spin_unlock_bh(&cmd->istate_lock);
972 972
diff --git a/drivers/target/iscsi/iscsi_target_tmr.c b/drivers/target/iscsi/iscsi_target_tmr.c
index 1f7552986168..f62fe123d902 100644
--- a/drivers/target/iscsi/iscsi_target_tmr.c
+++ b/drivers/target/iscsi/iscsi_target_tmr.c
@@ -257,7 +257,8 @@ static int iscsit_task_reassign_complete_write(
257 pr_debug("WRITE ITT: 0x%08x: t_state: %d" 257 pr_debug("WRITE ITT: 0x%08x: t_state: %d"
258 " never sent to transport\n", 258 " never sent to transport\n",
259 cmd->init_task_tag, cmd->se_cmd.t_state); 259 cmd->init_task_tag, cmd->se_cmd.t_state);
260 return transport_generic_handle_data(se_cmd); 260 target_execute_cmd(se_cmd);
261 return 0;
261 } 262 }
262 263
263 cmd->i_state = ISTATE_SEND_STATUS; 264 cmd->i_state = ISTATE_SEND_STATUS;