From 471c2dc7414fa804cb4d82af1542f4f0a9173b00 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Wed, 21 Aug 2019 08:30:55 -0700 Subject: [PATCH] simple_lmk: Remove kthread_should_stop() exit condition Simple LMK's reclaim thread should never stop; there's no need to have this check. Signed-off-by: Sultan Alsawaf --- drivers/android/simple_lmk.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/android/simple_lmk.c b/drivers/android/simple_lmk.c index e7e91b7b4c7b..845679a4cbed 100644 --- a/drivers/android/simple_lmk.c +++ b/drivers/android/simple_lmk.c @@ -250,13 +250,7 @@ static int simple_lmk_reclaim_thread(void *data) sched_setscheduler_nocheck(current, SCHED_FIFO, &sched_max_rt_prio); while (1) { - bool should_stop; - - wait_event(oom_waitq, (should_stop = kthread_should_stop()) || - READ_ONCE(needs_reclaim)); - - if (should_stop) - break; + wait_event(oom_waitq, READ_ONCE(needs_reclaim)); /* * Kill a batch of processes and wait for their memory to be