From a0f75712135b31bdc354d09031a7f611676c856f Mon Sep 17 00:00:00 2001 From: David Teigland Date: Wed, 7 Nov 2007 09:03:56 -0600 Subject: [PATCH] --- yaml --- r: 76029 b: refs/heads/master c: 8cbc4342478311c2a85260a7ca54d96cb7f71f7b h: refs/heads/master i: 76027: 64215376ecc4afa16f3e363124ba69c981ee4b8d v: v3 --- [refs] | 2 +- trunk/fs/gfs2/locking/dlm/thread.c | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index edba2ae466df..1cb282884455 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c7227e46423a57b4df27a2d75b5869bd3ae654d0 +refs/heads/master: 8cbc4342478311c2a85260a7ca54d96cb7f71f7b diff --git a/trunk/fs/gfs2/locking/dlm/thread.c b/trunk/fs/gfs2/locking/dlm/thread.c index bd938f06481d..521694fc19d6 100644 --- a/trunk/fs/gfs2/locking/dlm/thread.c +++ b/trunk/fs/gfs2/locking/dlm/thread.c @@ -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()) { - set_current_state(TASK_INTERRUPTIBLE); - add_wait_queue(&ls->thread_wait, &wait); - if (no_work(ls, blist)) - schedule(); - remove_wait_queue(&ls->thread_wait, &wait); - set_current_state(TASK_RUNNING); + wait_event_interruptible(ls->thread_wait, + !no_work(ls, blist) || kthread_should_stop()); complete = blocking = submit = drop = 0;