Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kthread: unexport __kthread_should_park()

There are no in-kernel users of __kthread_should_park() so mark it as
static and do not export it.

Link: https://lkml.kernel.org/r/2023080450-handcuff-stump-1d6e@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: John Stultz <jstultz@google.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>
Cc: Mike Christie <michael.christie@oracle.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Zqiang <qiang1.zhang@intel.com>
Cc: Prathu Baronia <quic_pbaronia@quicinc.com>
Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Greg Kroah-Hartman and committed by
Andrew Morton
be33db21 bbe3656a

+1 -3
-1
include/linux/kthread.h
··· 88 88 int kthread_stop(struct task_struct *k); 89 89 bool kthread_should_stop(void); 90 90 bool kthread_should_park(void); 91 - bool __kthread_should_park(struct task_struct *k); 92 91 bool kthread_should_stop_or_park(void); 93 92 bool kthread_freezable_should_stop(bool *was_frozen); 94 93 void *kthread_func(struct task_struct *k);
+1 -2
kernel/kthread.c
··· 159 159 } 160 160 EXPORT_SYMBOL(kthread_should_stop); 161 161 162 - bool __kthread_should_park(struct task_struct *k) 162 + static bool __kthread_should_park(struct task_struct *k) 163 163 { 164 164 return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(k)->flags); 165 165 } 166 - EXPORT_SYMBOL_GPL(__kthread_should_park); 167 166 168 167 /** 169 168 * kthread_should_park - should this kthread park now?