From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbcETEis (ORCPT ); Fri, 20 May 2016 00:38:48 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33018 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbcETEiq (ORCPT ); Fri, 20 May 2016 00:38:46 -0400 From: Mike Danese Cc: Mike Danese , Kentaro Takeda , Tetsuo Handa , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org (open list:SECURITY SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] security: tomoyo: simplify the gc kthread creation Date: Thu, 19 May 2016 21:37:53 -0700 Message-Id: <1463719073-1346-1-git-send-email-mikedanese@google.com> X-Mailer: git-send-email 2.5.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The code is doing the equivalent of the kthread_run macro. Signed-off-by: Mike Danese --- security/tomoyo/gc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c index 986a6a7..540bc29 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"); } -- 2.5.0