From: Mike Danese Date: Fri, 20 May 2016 04:37:53 +0000 (-0700) Subject: security: tomoyo: simplify the gc kthread creation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40d273782ff16fe1a7445cc05c66a447dfea3433;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git security: tomoyo: simplify the gc kthread creation The code is doing the equivalent of the kthread_run macro. Signed-off-by: Mike Danese Acked-by: Tetsuo Handa Signed-off-by: James Morris --- diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c index 986a6a756868..540bc29e1b5a 100644 --- a/security/tomoyo/gc.c +++ b/security/tomoyo/gc.c @@ -645,11 +645,6 @@ void tomoyo_notify_gc(struct tomoyo_io_buffer *head, const bool is_register) } } spin_unlock(&tomoyo_io_buffer_list_lock); - if (is_write) { - struct task_struct *task = kthread_create(tomoyo_gc_thread, - NULL, - "GC for TOMOYO"); - if (!IS_ERR(task)) - wake_up_process(task); - } + if (is_write) + kthread_run(tomoyo_gc_thread, NULL, "GC for TOMOYO"); }