Commit 58a2801a4b9ad97d3685bb7a3344e17d60292908

Authored by Christoph Hellwig
Committed by Nicholas Bellinger
1 parent 6297b07cbc

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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

Showing 3 changed files with 1 additions and 6 deletions Side-by-side Diff

drivers/target/target_core_device.c
... ... @@ -104,7 +104,6 @@
104 104 se_cmd->se_lun = deve->se_lun;
105 105 se_cmd->pr_res_key = deve->pr_res_key;
106 106 se_cmd->orig_fe_lun = unpacked_lun;
107   - se_cmd->se_orig_obj_ptr = se_cmd->se_lun->lun_se_dev;
108 107 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
109 108 }
110 109 spin_unlock_irqrestore(&se_sess->se_node_acl->device_list_lock, flags);
... ... @@ -137,7 +136,6 @@
137 136 se_lun = &se_sess->se_tpg->tpg_virt_lun0;
138 137 se_cmd->se_lun = &se_sess->se_tpg->tpg_virt_lun0;
139 138 se_cmd->orig_fe_lun = 0;
140   - se_cmd->se_orig_obj_ptr = se_cmd->se_lun->lun_se_dev;
141 139 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD;
142 140 }
143 141 /*
... ... @@ -200,7 +198,6 @@
200 198 se_lun = deve->se_lun;
201 199 se_cmd->pr_res_key = deve->pr_res_key;
202 200 se_cmd->orig_fe_lun = unpacked_lun;
203   - se_cmd->se_orig_obj_ptr = se_cmd->se_dev;
204 201 }
205 202 spin_unlock_irqrestore(&se_sess->se_node_acl->device_list_lock, flags);
206 203  
drivers/target/target_core_transport.c
... ... @@ -2029,7 +2029,7 @@
2029 2029 {
2030 2030 int add_tasks;
2031 2031  
2032   - if (se_dev_check_online(cmd->se_orig_obj_ptr) != 0) {
  2032 + if (se_dev_check_online(cmd->se_dev) != 0) {
2033 2033 cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
2034 2034 transport_generic_request_failure(cmd);
2035 2035 return 0;
include/target/target_core_base.h
... ... @@ -444,8 +444,6 @@
444 444 struct list_head se_qf_node;
445 445 struct se_device *se_dev;
446 446 struct se_dev_entry *se_deve;
447   - struct se_device *se_obj_ptr;
448   - struct se_device *se_orig_obj_ptr;
449 447 struct se_lun *se_lun;
450 448 /* Only used for internal passthrough and legacy TCM fabric modules */
451 449 struct se_session *se_sess;