kernel: Make io_thread and kthread bit fields
authorMike Christie <michael.christie@oracle.com>
Fri, 10 Mar 2023 22:03:25 +0000 (16:03 -0600)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Sun, 12 Mar 2023 09:54:42 +0000 (10:54 +0100)
We only set args->io_thread/kthread to 0 or 1 then test if they are set,
so make them bit fields.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
include/linux/sched/task.h

index 32c9f01af0a65f225bc7ca709e259f24d33d71b9..268c77a421551bc5884f3b93a37912e1b044ceda 100644 (file)
@@ -25,6 +25,8 @@ struct kernel_clone_args {
        int __user *parent_tid;
        const char *name;
        int exit_signal;
+       u32 kthread:1;
+       u32 io_thread:1;
        unsigned long stack;
        unsigned long stack_size;
        unsigned long tls;
@@ -32,8 +34,6 @@ struct kernel_clone_args {
        /* Number of elements in *set_tid */
        size_t set_tid_size;
        int cgroup;
-       int io_thread;
-       int kthread;
        int idle;
        int (*fn)(void *);
        void *fn_arg;