From: David Teigland <[email protected]>

Mainline commit 07f9eebcdfaeefc8f807fa1bcce1d7c3ae6661b1

In ocfs2_unlock_ast(), call wake_up() on lockres before releasing
the spin lock on it.  As soon as the spin lock is released, the
lockres can be freed.

Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Mark Fasheh <[email protected]>
---
 fs/ocfs2/dlmglue.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 7781ef1..fce142b 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2756,9 +2756,8 @@ static void ocfs2_unlock_ast(void *opaque, enum 
dlm_status status)
        lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
 complete_unlock:
        lockres->l_unlock_action = OCFS2_UNLOCK_INVALID;
-       spin_unlock_irqrestore(&lockres->l_lock, flags);
-
        wake_up(&lockres->l_event);
+       spin_unlock_irqrestore(&lockres->l_lock, flags);
 
        mlog_exit_void();
 }
-- 
1.5.6.3


_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel

Reply via email to