[Ocfs2-commits] mfasheh commits r1659 - branches/dlm-glue/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Sat Nov 20 17:32:02 CST 2004
Author: mfasheh
Date: 2004-11-20 17:32:00 -0600 (Sat, 20 Nov 2004)
New Revision: 1659
Modified:
branches/dlm-glue/src/dlmglue.c
Log:
* drop the superblock lock before shutting down the dlm.
Modified: branches/dlm-glue/src/dlmglue.c
===================================================================
--- branches/dlm-glue/src/dlmglue.c 2004-11-20 03:00:49 UTC (rev 1658)
+++ branches/dlm-glue/src/dlmglue.c 2004-11-20 23:32:00 UTC (rev 1659)
@@ -154,6 +154,7 @@
ocfs2_vote_msg *msg);
static int __ocfs2_drop_lock(ocfs_super *osb,
ocfs2_lock_res *lockres);
+static void ocfs2_drop_super_lock(ocfs_super *osb);
static inline int ocfs2_highest_compat_lock_level(int level);
static int __ocfs2_downconvert_lock(ocfs_super *osb,
ocfs2_lock_res *lockres,
@@ -1276,6 +1277,8 @@
{
int wait_on_vote_task = 0;
+ ocfs2_drop_super_lock(osb);
+
/* needs to be able to deal with the dlm being in many
* different states. */
spin_lock(&osb->vote_task_lock);
@@ -1367,6 +1370,19 @@
return ret;
}
+static void ocfs2_drop_super_lock(ocfs_super *osb)
+{
+ int status;
+ ocfs2_lock_res *lockres;
+
+ lockres = &osb->super_lockres;
+
+ spin_lock(&lockres->l_lock);
+ status = __ocfs2_drop_lock(osb, lockres);
+ if (status < 0)
+ LOG_ERROR_STATUS(status);
+}
+
int ocfs2_drop_inode_locks(struct inode *inode)
{
int status, err;
More information about the Ocfs2-commits
mailing list