Commit 8cbc4342 authored by David Teigland's avatar David Teigland Committed by Steven Whitehouse
Browse files

[GFS2] check kthread_should_stop when waiting

Use wait_event_interruptible() in the lock_dlm thread instead
of an open coded equivalent, and include a kthread_should_stop()
check in the wait test so we don't miss a kthread_stop().

Signed-off-by: default avatarDavid Teigland <>
Signed-off-by: default avatarSteven Whitehouse <>
parent c7227e46
......@@ -273,18 +273,13 @@ static int gdlm_thread(void *data, int blist)
struct gdlm_ls *ls = (struct gdlm_ls *) data;
struct gdlm_lock *lp = NULL;
uint8_t complete, blocking, submit, drop;
DECLARE_WAITQUEUE(wait, current);
/* Only thread1 is allowed to do blocking callbacks since gfs
may wait for a completion callback within a blocking cb. */
while (!kthread_should_stop()) {
add_wait_queue(&ls->thread_wait, &wait);
if (no_work(ls, blist))
remove_wait_queue(&ls->thread_wait, &wait);
!no_work(ls, blist) || kthread_should_stop());
complete = blocking = submit = drop = 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment