Skip to contentSkip to conversation

target: precedence error in __transport_stop_task_timer()

PATCH New Dan Carpenter 1 participant 1 message Aug 8, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target: precedence error in __transport_stop_task_timer()

'!' has higher precedence than '&' so the original check only returns if no ->task_flags are set.

drivers/target/target_core_transport.c +1 -1
index 8976032..048779c 100644
@@ -2250,7 +2250,7 @@ void __transport_stop_task_timer(struct se_task *task, unsigned long *flags)
 {
 	struct se_cmd *cmd = task->task_se_cmd;
 
-	if (!task->task_flags & TF_RUNNING)
+	if (!(task->task_flags & TF_RUNNING))
 		return;
 
 	task->task_flags |= TF_STOP;