Skip to contentSkip to conversation

kthread: remove worker->task self-assignment

PATCH Superseded Bradley Morgan 1 participant 1 message Aug 29

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kthread: remove worker->task self-assignment

From: Bradley Morgan <[email protected]>

All kthread worker users now create their workers with kthread_create_worker*(), which sets worker->task before the worker starts. The self-assignment in kthread_worker_fn() is dead code now.

Remove it.

---
 kernel/kthread.c | 7 -------
 1 file changed, 7 deletions(-)
kernel/kthread.c +0 -7
index 63beb59b7a3d..18bc702e8d2d 100644
@@ -987,13 +987,6 @@ int kthread_worker_fn(void *worker_ptr)
 	struct kthread_worker *worker = worker_ptr;
 	struct kthread_work *work;
 
-	/*
-	 * FIXME: Update the check and remove the assignment when all kthread
-	 * worker users are created using kthread_create_worker*() functions.
-	 */
-	WARN_ON(worker->task && worker->task != current);
-	worker->task = current;
-
 	if (worker->flags & KTW_FREEZABLE)
 		set_freezable();
 
Signature · 1 line
2.47.3