kthread: remove worker->task self-assignment
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.
Signed-off-by Bradley Morgan <[email protected]>
--- kernel/kthread.c | 7 ------- 1 file changed, 7 deletions(-)
kernel/kthread.c +0 -7
@@ -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