It doesn't appear to be used anywhere, and is the site of an oops (deve is invalid in core_dec_lacl_count), see: https://bugzilla.redhat.com/show_bug.cgi?id=886698 ...so there may still be a bug lurking, but maybe it'll be easier to spot with this gone. Compile-tested only. Signed-off-by: Andy Grover <agrover@xxxxxxxxxx> --- drivers/target/target_core_device.c | 13 ------------- drivers/target/target_core_transport.c | 2 -- include/target/target_core_base.h | 1 - 3 files changed, 0 insertions(+), 16 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index e269510..720349d 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -85,8 +85,6 @@ transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun) else if (se_cmd->data_direction == DMA_FROM_DEVICE) deve->read_bytes += se_cmd->data_length; - deve->deve_cmds++; - se_lun = deve->se_lun; se_cmd->se_lun = deve->se_lun; se_cmd->pr_res_key = deve->pr_res_key; @@ -275,17 +273,6 @@ int core_free_device_list_for_node( return 0; } -void core_dec_lacl_count(struct se_node_acl *se_nacl, struct se_cmd *se_cmd) -{ - struct se_dev_entry *deve; - unsigned long flags; - - spin_lock_irqsave(&se_nacl->device_list_lock, flags); - deve = se_nacl->device_list[se_cmd->orig_fe_lun]; - deve->deve_cmds--; - spin_unlock_irqrestore(&se_nacl->device_list_lock, flags); -} - void core_update_device_list_access( u32 mapped_lun, u32 lun_access, diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 1ebde4c..31586ec 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2156,8 +2156,6 @@ void transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks) if (wait_for_tasks) transport_wait_for_tasks(cmd); - core_dec_lacl_count(cmd->se_sess->se_node_acl, cmd); - if (cmd->se_lun) transport_lun_remove_cmd(cmd); diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 1346ee0..bbdf5d3 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -567,7 +567,6 @@ struct se_dev_entry { bool def_pr_registered; /* See transport_lunflags_table */ u32 lun_flags; - u32 deve_cmds; u32 mapped_lun; u32 average_bytes; u32 last_byte_count; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html