aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2010-02-01 19:55:50 -0500
committerJoel Becker <joel.becker@oracle.com>2010-02-03 02:51:16 -0500
commitdb0f6ce69776370232431eb8be85a5b18b0019c0 (patch)
treecd3a18bf13fa6dcbf2c59940565ddfaedabcdd89 /fs
parent0d74125a6a68d4f1969ecaf0b3543f315916ccdc (diff)
ocfs2: Remove overzealous BUG_ON during blocked lock processing
During blocked lock processing, we should consider the possibility that the lock is no longer blocking. Joel Becker <joel.becker@oracle.com> assisted in fixing this issue. Reported-by: David Teigland <teigland@redhat.com> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/dlmglue.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index ac24f49ae2fb..ce8e061c9a22 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -3392,9 +3392,17 @@ static int ocfs2_unblock_lock(struct ocfs2_super *osb,
3392 3392
3393 spin_lock_irqsave(&lockres->l_lock, flags); 3393 spin_lock_irqsave(&lockres->l_lock, flags);
3394 3394
3395 BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BLOCKED));
3396
3397recheck: 3395recheck:
3396 /*
3397 * Is it still blocking? If not, we have no more work to do.
3398 */
3399 if (!(lockres->l_flags & OCFS2_LOCK_BLOCKED)) {
3400 BUG_ON(lockres->l_blocking != DLM_LOCK_NL);
3401 spin_unlock_irqrestore(&lockres->l_lock, flags);
3402 ret = 0;
3403 goto leave;
3404 }
3405
3398 if (lockres->l_flags & OCFS2_LOCK_BUSY) { 3406 if (lockres->l_flags & OCFS2_LOCK_BUSY) {
3399 /* XXX 3407 /* XXX
3400 * This is a *big* race. The OCFS2_LOCK_PENDING flag 3408 * This is a *big* race. The OCFS2_LOCK_PENDING flag