Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

security: tomoyo: simplify the gc kthread creation

The code is doing the equivalent of the kthread_run macro.

Signed-off-by: Mike Danese <mikedanese@google.com>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <james.l.morris@oracle.com>

authored by

Mike Danese and committed by
James Morris
40d27378 d6e0d306

+2 -7
+2 -7
security/tomoyo/gc.c
··· 645 645 } 646 646 } 647 647 spin_unlock(&tomoyo_io_buffer_list_lock); 648 - if (is_write) { 649 - struct task_struct *task = kthread_create(tomoyo_gc_thread, 650 - NULL, 651 - "GC for TOMOYO"); 652 - if (!IS_ERR(task)) 653 - wake_up_process(task); 654 - } 648 + if (is_write) 649 + kthread_run(tomoyo_gc_thread, NULL, "GC for TOMOYO"); 655 650 }