aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmconvert.c
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2007-01-17 17:59:12 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2007-02-07 15:05:19 -0500
commita6fa36402aba96362311318200d710ea1719e59b (patch)
tree59c52d0437c99f55a89dfa08dc25508b2414bbcb /fs/ocfs2/dlm/dlmconvert.c
parent28b72d9c92ed43e01e4094f57bcad1814b002779 (diff)
ocfs2_dlm: wake up sleepers on the lockres waitqueue
The dlm was not waking up threads waiting on the lockres wait queue, waiting for the lockres to be no longer be in the DLM_LOCK_RES_IN_PROGRESS and the DLM_LOCK_RES_MIGRATING states. Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmconvert.c')
-rw-r--r--fs/ocfs2/dlm/dlmconvert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c
index c764dc8e40a..42c17744485 100644
--- a/fs/ocfs2/dlm/dlmconvert.c
+++ b/fs/ocfs2/dlm/dlmconvert.c
@@ -428,7 +428,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
428 struct dlm_lockstatus *lksb; 428 struct dlm_lockstatus *lksb;
429 enum dlm_status status = DLM_NORMAL; 429 enum dlm_status status = DLM_NORMAL;
430 u32 flags; 430 u32 flags;
431 int call_ast = 0, kick_thread = 0, ast_reserved = 0; 431 int call_ast = 0, kick_thread = 0, ast_reserved = 0, wake = 0;
432 432
433 if (!dlm_grab(dlm)) { 433 if (!dlm_grab(dlm)) {
434 dlm_error(DLM_REJECTED); 434 dlm_error(DLM_REJECTED);
@@ -524,8 +524,11 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
524 cnv->requested_type, 524 cnv->requested_type,
525 &call_ast, &kick_thread); 525 &call_ast, &kick_thread);
526 res->state &= ~DLM_LOCK_RES_IN_PROGRESS; 526 res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
527 wake = 1;
527 } 528 }
528 spin_unlock(&res->spinlock); 529 spin_unlock(&res->spinlock);
530 if (wake)
531 wake_up(&res->wq);
529 532
530 if (status != DLM_NORMAL) { 533 if (status != DLM_NORMAL) {
531 if (status != DLM_NOTQUEUED) 534 if (status != DLM_NOTQUEUED)