You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
rcutorture: Abstract torture_stop_kthread()
Stopping of kthreads is not RCU-specific, so this commit abstracts out torture_stop_kthread(), saving a few lines of code in the process. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
@@ -700,3 +700,16 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(_torture_create_kthread);
|
||||
|
||||
/*
|
||||
* Stop a generic kthread, emitting a message.
|
||||
*/
|
||||
void _torture_stop_kthread(char *m, struct task_struct **tp)
|
||||
{
|
||||
if (*tp == NULL)
|
||||
return;
|
||||
VERBOSE_TOROUT_STRING(m);
|
||||
kthread_stop(*tp);
|
||||
*tp = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(_torture_stop_kthread);
|
||||
|
||||
Reference in New Issue
Block a user