[PATCH V5 08/10] fork: remove create_io_thread

From: Mike Christie
Date: Sun Nov 21 2021 - 12:50:25 EST


create_io_thread is not used anymore so remove it.

Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
---
include/linux/sched/task.h | 1 -
kernel/fork.c | 22 ----------------------
2 files changed, 23 deletions(-)

diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 2188be3a3142..313fb8c825ae 100644
--- a/include/linux/sched/task.h
+++ b/include/linux/sched/task.h
@@ -89,7 +89,6 @@ extern void exit_files(struct task_struct *);
extern void exit_itimers(struct signal_struct *);

extern pid_t kernel_clone(struct kernel_clone_args *kargs);
-struct task_struct *create_io_thread(int (*fn)(void *), void *arg, int node);
struct task_struct *kernel_worker(int (*fn)(void *), void *arg, int node,
unsigned long clone_flags, u32 worker_flags);
__printf(2, 3)
diff --git a/kernel/fork.c b/kernel/fork.c
index 3729abafbdf9..1b44d048ec16 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2521,28 +2521,6 @@ struct mm_struct *copy_init_mm(void)
return dup_mm(NULL, &init_mm);
}

-/*
- * This is like kernel_clone(), but shaved down and tailored to just
- * creating io_uring workers. It returns a created task, or an error pointer.
- * The returned task is inactive, and the caller must fire it up through
- * wake_up_new_task(p). All signals are blocked in the created task.
- */
-struct task_struct *create_io_thread(int (*fn)(void *), void *arg, int node)
-{
- unsigned long flags = CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|
- CLONE_IO;
- struct kernel_clone_args args = {
- .flags = ((lower_32_bits(flags) | CLONE_VM |
- CLONE_UNTRACED) & ~CSIGNAL),
- .exit_signal = (lower_32_bits(flags) & CSIGNAL),
- .stack = (unsigned long)fn,
- .stack_size = (unsigned long)arg,
- .worker_flags = KERN_WORKER_IO | KERN_WORKER_USER,
- };
-
- return copy_process(NULL, 0, node, &args);
-}
-
static bool kernel_worker_flags_valid(struct kernel_clone_args *kargs)
{
/* Verify that no unknown flags are passed along. */
--
2.25.1