[Ocfs2-commits] mfasheh commits r2135 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Apr 11 23:13:40 CDT 2005
Author: mfasheh
Signed-off-by: khackel
Date: 2005-04-11 23:13:38 -0500 (Mon, 11 Apr 2005)
New Revision: 2135
Modified:
trunk/fs/ocfs2/dlmglue.c
Log:
* ocfs2_lock_create should also bail out if it detects a busy lock --
all callers know how to handle this so we're good.
Signed-off-by: khackel
Modified: trunk/fs/ocfs2/dlmglue.c
===================================================================
--- trunk/fs/ocfs2/dlmglue.c 2005-04-12 04:13:06 UTC (rev 2134)
+++ trunk/fs/ocfs2/dlmglue.c 2005-04-12 04:13:38 UTC (rev 2135)
@@ -785,6 +785,9 @@
LOG_EXIT();
}
+/* Note: If we detect another process working on the lock (i.e.,
+ * OCFS2_LOCK_BUSY), we'll bail out returning 0. It's up to the caller
+ * to do the right thing in that case. */
static int ocfs2_lock_create(ocfs_super *osb,
ocfs2_lock_res *lockres,
int level,
@@ -799,7 +802,8 @@
flags);
spin_lock(&lockres->l_lock);
- if (lockres->l_flags & OCFS2_LOCK_ATTACHED) {
+ if ((lockres->l_flags & OCFS2_LOCK_ATTACHED) ||
+ (lockres->l_flags & OCFS2_LOCK_BUSY)) {
spin_unlock(&lockres->l_lock);
goto bail;
}
More information about the Ocfs2-commits
mailing list