staging: lustre: change sai_thread to sai_task.
Rather than allocating a ptlrpc_thread for the stat-ahead thread, just use the task_struct provided by kthreads directly. As nothing ever waits for the sai_task, it must call do_exit() directly rather than simply return from the function. Also it cannot use kthread_should_stop() to know when to stop. There is one caller which can ask it to stop so we need a simple signaling mechanism. I've chosen to set ->sai_task to NULL when the thread should finish up. The thread notices this and cleans up and exits. lli_sa_lock is used to avoid races between waking up the process and the process exiting. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment