From 1880807adb21d741f08b747956c90bf4a6f95fbf Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 23 Nov 2011 06:54:36 -0500 Subject: target: make the se_task task_state_active a normal bool There is no need to make task_state_active an atomic_t given that it is always set under the execute_task_lock so we can make it a simple bool. Also rename it to t_state_active to be closer to the list it guards, and make sure all checks before the list addion/removal actually happen under execute_task_lock. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/target') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index e2473e6770b..311f5fc607e 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -491,10 +491,10 @@ struct se_task { u16 task_flags; u8 task_scsi_status; enum dma_data_direction task_data_direction; - atomic_t task_state_active; struct list_head t_list; struct list_head t_execute_list; struct list_head t_state_list; + bool t_state_active; struct completion task_stop_comp; } ____cacheline_aligned; -- cgit v1.2.3