@@ -2289,8 +2289,8 @@ static void srpt_queue_response(struct se_cmd *cmd)
}
spin_unlock_irqrestore(&ioctx->spinlock, flags);
- if (unlikely(transport_check_aborted_status(&ioctx->cmd, false)
- || WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))) {
+ if (unlikely((ioctx->cmd.transport_state & CMD_T_ABORTED) ||
+ WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))) {
atomic_inc(&ch->req_lim_delta);
srpt_abort_cmd(ioctx);
return;
@@ -1512,8 +1512,6 @@ __iscsit_check_dataout_hdr(struct iscsi_conn *conn, void *buf,
if (hdr->flags & ISCSI_FLAG_CMD_FINAL)
iscsit_stop_dataout_timer(cmd);
- transport_check_aborted_status(se_cmd,
- (hdr->flags & ISCSI_FLAG_CMD_FINAL));
return iscsit_dump_data_payload(conn, payload_length, 1);
}
} else {
@@ -1529,11 +1527,8 @@ __iscsit_check_dataout_hdr(struct iscsi_conn *conn, void *buf,
*/
if (se_cmd->transport_state & CMD_T_ABORTED) {
if (hdr->flags & ISCSI_FLAG_CMD_FINAL)
- if (--cmd->outstanding_r2ts < 1) {
+ if (--cmd->outstanding_r2ts < 1)
iscsit_stop_dataout_timer(cmd);
- transport_check_aborted_status(
- se_cmd, 1);
- }
return iscsit_dump_data_payload(conn, payload_length, 1);
}
@@ -951,8 +951,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
* should be sent after unsolicited data out with
* ISCSI_FLAG_CMD_FINAL set in iscsi_handle_data_out()
*/
- if (transport_check_aborted_status(se_cmd,
- (cmd->unsolicited_data == 0)) != 0)
+ if (se_cmd->transport_state & CMD_T_ABORTED)
return 0;
/*
* Otherwise send CHECK_CONDITION and sense for
@@ -980,8 +979,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
* WRITEs if no more unsolicitied data is
* expected.
*/
- if (transport_check_aborted_status(se_cmd, 1)
- != 0)
+ if (se_cmd->transport_state & CMD_T_ABORTED)
return 0;
iscsit_set_dataout_sequence_values(cmd);
@@ -1000,7 +998,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
* Send the delayed TASK_ABORTED status for WRITEs if
* no more nsolicitied data is expected.
*/
- if (transport_check_aborted_status(se_cmd, 1) != 0)
+ if (se_cmd->transport_state & CMD_T_ABORTED)
return 0;
iscsit_set_unsoliticed_dataout(cmd);
@@ -1679,7 +1679,7 @@ void transport_generic_request_failure(struct se_cmd *cmd,
{
int ret = 0, post_ret = 0;
- if (transport_check_aborted_status(cmd, 1)) {
+ if (cmd->transport_state & CMD_T_ABORTED) {
target_handle_abort(cmd);
return;
}
@@ -1902,7 +1902,7 @@ static bool target_handle_task_attr(struct se_cmd *cmd)
void target_execute_cmd(struct se_cmd *cmd)
{
- if (transport_check_aborted_status(cmd, 1)) {
+ if (cmd->transport_state & CMD_T_ABORTED) {
target_handle_abort(cmd);
return;
}
@@ -3104,12 +3104,6 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
}
EXPORT_SYMBOL(transport_send_check_condition_and_sense);
-bool transport_check_aborted_status(struct se_cmd *cmd, int send_status)
-{
- return cmd->transport_state & CMD_T_ABORTED;
-}
-EXPORT_SYMBOL(transport_check_aborted_status);
-
static void target_tmr_work(struct work_struct *work)
{
struct se_cmd *cmd = container_of(work, struct se_cmd, work);
@@ -153,7 +153,6 @@ void target_execute_cmd(struct se_cmd *cmd);
int transport_generic_free_cmd(struct se_cmd *, int);
bool transport_wait_for_tasks(struct se_cmd *);
-bool transport_check_aborted_status(struct se_cmd *, int);
int transport_send_check_condition_and_sense(struct se_cmd *,
sense_reason_t, int);
int target_get_sess_cmd(struct se_cmd *, bool);