diff options
Diffstat (limited to 'fs/gfs2/locking/dlm/thread.c')
-rw-r--r-- | fs/gfs2/locking/dlm/thread.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c index bd938f06481d..521694fc19d6 100644 --- a/fs/gfs2/locking/dlm/thread.c +++ b/fs/gfs2/locking/dlm/thread.c | |||
@@ -273,18 +273,13 @@ static int gdlm_thread(void *data, int blist) | |||
273 | struct gdlm_ls *ls = (struct gdlm_ls *) data; | 273 | struct gdlm_ls *ls = (struct gdlm_ls *) data; |
274 | struct gdlm_lock *lp = NULL; | 274 | struct gdlm_lock *lp = NULL; |
275 | uint8_t complete, blocking, submit, drop; | 275 | uint8_t complete, blocking, submit, drop; |
276 | DECLARE_WAITQUEUE(wait, current); | ||
277 | 276 | ||
278 | /* Only thread1 is allowed to do blocking callbacks since gfs | 277 | /* Only thread1 is allowed to do blocking callbacks since gfs |
279 | may wait for a completion callback within a blocking cb. */ | 278 | may wait for a completion callback within a blocking cb. */ |
280 | 279 | ||
281 | while (!kthread_should_stop()) { | 280 | while (!kthread_should_stop()) { |
282 | set_current_state(TASK_INTERRUPTIBLE); | 281 | wait_event_interruptible(ls->thread_wait, |
283 | add_wait_queue(&ls->thread_wait, &wait); | 282 | !no_work(ls, blist) || kthread_should_stop()); |
284 | if (no_work(ls, blist)) | ||
285 | schedule(); | ||
286 | remove_wait_queue(&ls->thread_wait, &wait); | ||
287 | set_current_state(TASK_RUNNING); | ||
288 | 283 | ||
289 | complete = blocking = submit = drop = 0; | 284 | complete = blocking = submit = drop = 0; |
290 | 285 | ||