Commit 58a2801a authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nicholas Bellinger

target: remove the se_obj_ptr and se_orig_obj_ptr se_cmd fields

We already have a perfectly valid se_device pointer in the command, so
remove the mostly useless duplicates.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 6297b07c
...@@ -104,7 +104,6 @@ int transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun) ...@@ -104,7 +104,6 @@ int transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun)
se_cmd->se_lun = deve->se_lun; se_cmd->se_lun = deve->se_lun;
se_cmd->pr_res_key = deve->pr_res_key; se_cmd->pr_res_key = deve->pr_res_key;
se_cmd->orig_fe_lun = unpacked_lun; se_cmd->orig_fe_lun = unpacked_lun;
se_cmd->se_orig_obj_ptr = se_cmd->se_lun->lun_se_dev;
se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
} }
spin_unlock_irqrestore(&se_sess->se_node_acl->device_list_lock, flags); spin_unlock_irqrestore(&se_sess->se_node_acl->device_list_lock, flags);
...@@ -137,7 +136,6 @@ int transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun) ...@@ -137,7 +136,6 @@ int transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun)
se_lun = &se_sess->se_tpg->tpg_virt_lun0; se_lun = &se_sess->se_tpg->tpg_virt_lun0;
se_cmd->se_lun = &se_sess->se_tpg->tpg_virt_lun0; se_cmd->se_lun = &se_sess->se_tpg->tpg_virt_lun0;
se_cmd->orig_fe_lun = 0; se_cmd->orig_fe_lun = 0;
se_cmd->se_orig_obj_ptr = se_cmd->se_lun->lun_se_dev;
se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
} }
/* /*
...@@ -200,7 +198,6 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u32 unpacked_lun) ...@@ -200,7 +198,6 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u32 unpacked_lun)
se_lun = deve->se_lun; se_lun = deve->se_lun;
se_cmd->pr_res_key = deve->pr_res_key; se_cmd->pr_res_key = deve->pr_res_key;
se_cmd->orig_fe_lun = unpacked_lun; se_cmd->orig_fe_lun = unpacked_lun;
se_cmd->se_orig_obj_ptr = se_cmd->se_dev;
} }
spin_unlock_irqrestore(&se_sess->se_node_acl->device_list_lock, flags); spin_unlock_irqrestore(&se_sess->se_node_acl->device_list_lock, flags);
......
...@@ -2029,7 +2029,7 @@ static int transport_execute_tasks(struct se_cmd *cmd) ...@@ -2029,7 +2029,7 @@ static int transport_execute_tasks(struct se_cmd *cmd)
{ {
int add_tasks; int add_tasks;
if (se_dev_check_online(cmd->se_orig_obj_ptr) != 0) { if (se_dev_check_online(cmd->se_dev) != 0) {
cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
transport_generic_request_failure(cmd); transport_generic_request_failure(cmd);
return 0; return 0;
......
...@@ -444,8 +444,6 @@ struct se_cmd { ...@@ -444,8 +444,6 @@ struct se_cmd {
struct list_head se_qf_node; struct list_head se_qf_node;
struct se_device *se_dev; struct se_device *se_dev;
struct se_dev_entry *se_deve; struct se_dev_entry *se_deve;
struct se_device *se_obj_ptr;
struct se_device *se_orig_obj_ptr;
struct se_lun *se_lun; struct se_lun *se_lun;
/* Only used for internal passthrough and legacy TCM fabric modules */ /* Only used for internal passthrough and legacy TCM fabric modules */
struct se_session *se_sess; struct se_session *se_sess;
......
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