From 086a9c803498af775c68812105d7e4d058383e01 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Mon, 1 Feb 2010 16:55:50 -0800 Subject: [PATCH] --- yaml --- r: 180367 b: refs/heads/master c: db0f6ce69776370232431eb8be85a5b18b0019c0 h: refs/heads/master i: 180365: e2ed6964af515c796468b6e9dc00cec64e1016ad 180363: a39be2c4201ae08270449000e5e1766abd2d6208 180359: fd8f3b44c0ed9d7178240af607fb770fa1cd02e4 180351: 46a63357cbaff0c621c2c9269499981826b46d42 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/dlmglue.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0a7f1b507649..17d675e84fd7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0d74125a6a68d4f1969ecaf0b3543f315916ccdc +refs/heads/master: db0f6ce69776370232431eb8be85a5b18b0019c0 diff --git a/trunk/fs/ocfs2/dlmglue.c b/trunk/fs/ocfs2/dlmglue.c index ac24f49ae2fb..ce8e061c9a22 100644 --- a/trunk/fs/ocfs2/dlmglue.c +++ b/trunk/fs/ocfs2/dlmglue.c @@ -3392,9 +3392,17 @@ static int ocfs2_unblock_lock(struct ocfs2_super *osb, spin_lock_irqsave(&lockres->l_lock, flags); - BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BLOCKED)); - recheck: + /* + * Is it still blocking? If not, we have no more work to do. + */ + if (!(lockres->l_flags & OCFS2_LOCK_BLOCKED)) { + BUG_ON(lockres->l_blocking != DLM_LOCK_NL); + spin_unlock_irqrestore(&lockres->l_lock, flags); + ret = 0; + goto leave; + } + if (lockres->l_flags & OCFS2_LOCK_BUSY) { /* XXX * This is a *big* race. The OCFS2_LOCK_PENDING flag