linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security: tomoyo: simplify the gc kthread creation
@ 2016-05-20  4:37 Mike Danese
  2016-05-20 11:59 ` Tetsuo Handa
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Danese @ 2016-05-20  4:37 UTC (permalink / raw)
  Cc: Mike Danese, Kentaro Takeda, Tetsuo Handa, James Morris,
	Serge E. Hallyn, open list:SECURITY SUBSYSTEM, open list

The code is doing the equivalent of the kthread_run macro.

Signed-off-by: Mike Danese <mikedanese@google.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-06  9:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20  4:37 [PATCH] security: tomoyo: simplify the gc kthread creation Mike Danese
2016-05-20 11:59 ` Tetsuo Handa
2016-06-06  9:53   ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).