* iscsit_get_lun_for_cmd() in iscsit_handle_scsi_cmd().
*/
if (cmd->tmr_req && se_cmd->transport_wait_for_tasks)
- se_cmd->transport_wait_for_tasks(se_cmd, 1, 1);
+ se_cmd->transport_wait_for_tasks(se_cmd, 1);
else if (cmd->se_cmd.se_cmd_flags & SCF_SE_LUN_CMD)
transport_release_cmd(se_cmd);
else
se_cmd = &cmd->se_cmd;
if (se_cmd->transport_wait_for_tasks)
- se_cmd->transport_wait_for_tasks(se_cmd, 1, 1);
+ se_cmd->transport_wait_for_tasks(se_cmd, 1);
spin_lock_bh(&conn->cmd_lock);
}
iscsit_release_cmd(cmd);
else
cmd->se_cmd.transport_wait_for_tasks(
- &cmd->se_cmd, 1, 1);
+ &cmd->se_cmd, 1);
spin_lock(&cr->conn_recovery_cmd_lock);
}
spin_unlock(&cr->conn_recovery_cmd_lock);
iscsit_release_cmd(cmd);
else
cmd->se_cmd.transport_wait_for_tasks(
- &cmd->se_cmd, 1, 1);
+ &cmd->se_cmd, 1);
spin_lock(&cr->conn_recovery_cmd_lock);
}
spin_unlock(&cr->conn_recovery_cmd_lock);
iscsit_release_cmd(cmd);
else
cmd->se_cmd.transport_wait_for_tasks(
- &cmd->se_cmd, 1, 0);
+ &cmd->se_cmd, 1);
spin_lock(&cr->conn_recovery_cmd_lock);
}
spin_unlock(&cr->conn_recovery_cmd_lock);
iscsit_release_cmd(cmd);
else
cmd->se_cmd.transport_wait_for_tasks(
- &cmd->se_cmd, 1, 1);
+ &cmd->se_cmd, 1);
spin_lock_bh(&conn->cmd_lock);
}
spin_unlock_bh(&conn->cmd_lock);
iscsit_release_cmd(cmd);
else
cmd->se_cmd.transport_wait_for_tasks(
- &cmd->se_cmd, 1, 0);
+ &cmd->se_cmd, 1);
spin_lock_bh(&conn->cmd_lock);
continue;
}
iscsit_release_cmd(cmd);
else
cmd->se_cmd.transport_wait_for_tasks(
- &cmd->se_cmd, 1, 1);
+ &cmd->se_cmd, 1);
spin_lock_bh(&conn->cmd_lock);
continue;
}
if ((cmd->se_cmd.se_cmd_flags & SCF_SE_LUN_CMD) &&
cmd->se_cmd.transport_wait_for_tasks)
- cmd->se_cmd.transport_wait_for_tasks(&cmd->se_cmd,
- 0, 0);
+ cmd->se_cmd.transport_wait_for_tasks(&cmd->se_cmd, 0);
/*
* Add the struct iscsi_cmd to the connection recovery cmd list
*/
enum dma_data_direction data_direction,
struct scatterlist *sgl, unsigned int nents);
static int transport_generic_get_mem(struct se_cmd *cmd);
-static bool transport_put_cmd(struct se_cmd *cmd);
+static void transport_put_cmd(struct se_cmd *cmd);
static void transport_remove_cmd_from_queue(struct se_cmd *cmd,
struct se_queue_obj *qobj);
static int transport_set_sense_codes(struct se_cmd *cmd, u8 asc, u8 ascq);
return 0;
}
-static void transport_generic_wait_for_tasks(struct se_cmd *, int, int);
+static void transport_generic_wait_for_tasks(struct se_cmd *, int);
/* transport_generic_allocate_tasks():
*
spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);
}
-static void transport_nop_wait_for_tasks(struct se_cmd *, int, int);
+static void transport_nop_wait_for_tasks(struct se_cmd *, int);
static inline u32 transport_get_sectors_6(
unsigned char *cdb,
*
* This routine releases our reference to the command and frees it if possible.
*/
-static bool transport_put_cmd(struct se_cmd *cmd)
+static void transport_put_cmd(struct se_cmd *cmd)
{
unsigned long flags;
int free_tasks = 0;
transport_free_pages(cmd);
transport_release_cmd(cmd);
- return true;
+ return;
out_busy:
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
- return false;
}
/*
}
EXPORT_SYMBOL(transport_release_cmd);
-bool transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
+void transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
{
if (!(cmd->se_cmd_flags & SCF_SE_LUN_CMD))
transport_release_cmd(cmd);
transport_lun_remove_cmd(cmd);
if (wait_for_tasks && cmd->transport_wait_for_tasks)
- cmd->transport_wait_for_tasks(cmd, 0, 0);
+ cmd->transport_wait_for_tasks(cmd, 0);
transport_free_dev_tasks(cmd);
- return transport_put_cmd(cmd);
+ transport_put_cmd(cmd);
}
-
- return true;
}
EXPORT_SYMBOL(transport_generic_free_cmd);
static void transport_nop_wait_for_tasks(
struct se_cmd *cmd,
- int remove_cmd,
- int session_reinstatement)
+ int remove_cmd)
{
return;
}
*/
static void transport_generic_wait_for_tasks(
struct se_cmd *cmd,
- int remove_cmd,
- int session_reinstatement)
+ int remove_cmd)
{
unsigned long flags;
if (!remove_cmd)
return;
- if (!transport_generic_free_cmd(cmd, 0) && session_reinstatement) {
- unsigned long flags;
-
- spin_lock_irqsave(&cmd->t_state_lock, flags);
- transport_all_task_dev_remove_state(cmd);
- spin_unlock_irqrestore(&cmd->t_state_lock, flags);
- }
+ transport_generic_free_cmd(cmd, 0);
}
static int transport_get_sense_codes(
extern int transport_send_check_condition_and_sense(struct se_cmd *, u8, int);
extern void transport_send_task_abort(struct se_cmd *);
extern void transport_release_cmd(struct se_cmd *);
-extern bool transport_generic_free_cmd(struct se_cmd *, int);
+extern void transport_generic_free_cmd(struct se_cmd *, int);
extern void transport_generic_wait_for_cmds(struct se_cmd *, int);
extern int transport_init_task_sg(struct se_task *, struct se_mem *, u32);
extern int transport_map_mem_to_sg(struct se_task *, struct list_head *,