Skip to content

Commit

Permalink
ocfs2: fix wake_up in unlock_ast
Browse files Browse the repository at this point in the history
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 <teigland@redhat.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
  • Loading branch information
David Teigland authored and Mark Fasheh committed Dec 1, 2008
1 parent 66f502a commit 07f9eeb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ocfs2/dlmglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2841,9 +2841,8 @@ static void ocfs2_unlock_ast(void *opaque, int error)

lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
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();
}
Expand Down

0 comments on commit 07f9eeb

Please sign in to comment.