Skip to content

Commit

Permalink
security: tomoyo: simplify the gc kthread creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mikedanese authored and James Morris committed Jun 6, 2016
1 parent d6e0d30 commit 40d2737
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions security/tomoyo/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

0 comments on commit 40d2737

Please sign in to comment.