From 04629b7bde553e3703577779f53cb0ba1eddd2c0 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Oct 2011 11:07:04 -0400 Subject: target: Remove unnecessary se_task members This is a squashed version of the following unnecessary se_task structure member removal patches: target: remove the task_execute_queue field in se_task Instead of using a separate flag we can simply do list_emptry checks on t_execute_list if we make sure to always use list_del_init to remove a task from the list. Also factor some duplicate code into a new __transport_remove_task_from_execute_queue helper. target: remove the read-only task_no field in se_task The task_no field never was initialized and only used in debug printks, so kill it. target: remove the task_padded_sg field in se_task This field is only check in one place and not actually needed there. Rationale: - transport_do_task_sg_chain asserts that we have task_sg_chaining set early on - we only make use of the sg_prev_nents field we calculate based on it if there is another sg list that gets chained onto this one, which never happens for the last (or only) task. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/target/target_core_base.h') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 5e3dd1418bac..45291b23bc03 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -409,15 +409,12 @@ struct se_task { u8 task_scsi_status; u8 task_flags; int task_error_status; - bool task_padded_sg; unsigned long long task_lba; - u32 task_no; u32 task_sectors; u32 task_size; enum dma_data_direction task_data_direction; struct se_cmd *task_se_cmd; struct completion task_stop_comp; - atomic_t task_execute_queue; atomic_t task_state_active; struct timer_list task_timer; struct list_head t_list; -- cgit v1.2.3