Commit 67441b68 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nicholas Bellinger

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: default avatarChristoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent c3196f0c
...@@ -1413,8 +1413,10 @@ static int iscsit_handle_data_out(struct iscsi_conn *conn, unsigned char *buf) ...@@ -1413,8 +1413,10 @@ static int iscsit_handle_data_out(struct iscsi_conn *conn, unsigned char *buf)
spin_unlock_bh(&cmd->istate_lock); spin_unlock_bh(&cmd->istate_lock);
iscsit_stop_dataout_timer(cmd); iscsit_stop_dataout_timer(cmd);
return (!ooo_cmdsn) ? transport_generic_handle_data( if (ooo_cmdsn)
&cmd->se_cmd) : 0; return 0;
target_execute_cmd(&cmd->se_cmd);
return 0;
} else /* DATAOUT_CANNOT_RECOVER */ } else /* DATAOUT_CANNOT_RECOVER */
return -1; return -1;
......
...@@ -965,8 +965,8 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo) ...@@ -965,8 +965,8 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
if (cmd->immediate_data) { if (cmd->immediate_data) {
if (cmd->cmd_flags & ICF_GOT_LAST_DATAOUT) { if (cmd->cmd_flags & ICF_GOT_LAST_DATAOUT) {
spin_unlock_bh(&cmd->istate_lock); spin_unlock_bh(&cmd->istate_lock);
return transport_generic_handle_data( target_execute_cmd(&cmd->se_cmd);
&cmd->se_cmd); return 0;
} }
spin_unlock_bh(&cmd->istate_lock); spin_unlock_bh(&cmd->istate_lock);
......
...@@ -257,7 +257,8 @@ static int iscsit_task_reassign_complete_write( ...@@ -257,7 +257,8 @@ static int iscsit_task_reassign_complete_write(
pr_debug("WRITE ITT: 0x%08x: t_state: %d" pr_debug("WRITE ITT: 0x%08x: t_state: %d"
" never sent to transport\n", " never sent to transport\n",
cmd->init_task_tag, cmd->se_cmd.t_state); cmd->init_task_tag, cmd->se_cmd.t_state);
return transport_generic_handle_data(se_cmd); target_execute_cmd(se_cmd);
return 0;
} }
cmd->i_state = ISTATE_SEND_STATUS; cmd->i_state = ISTATE_SEND_STATUS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment