[Ocfs2-commits] manish commits r1720 - in trunk: cluster src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Dec 24 17:06:44 CST 2004
Author: manish
Date: 2004-12-24 17:06:42 -0600 (Fri, 24 Dec 2004)
New Revision: 1720
Modified:
trunk/cluster/heartbeat.c
trunk/src/dlmglue.c
Log:
Move inline function bodies to appear before their use
Modified: trunk/cluster/heartbeat.c
===================================================================
--- trunk/cluster/heartbeat.c 2004-12-24 08:36:37 UTC (rev 1719)
+++ trunk/cluster/heartbeat.c 2004-12-24 23:06:42 UTC (rev 1720)
@@ -693,6 +693,19 @@
HB_CB_STATE_READY
};
+static inline int hb_wait_on_callback_state(int type)
+{
+ while (hb_callback_state[type] == HB_CB_STATE_FROZEN) {
+ spin_unlock(&hb_cb_lock);
+ atomic_set(&hb_cb_ready, 0);
+ if (util_wait_atomic_eq(&hb_cb_wq, &hb_cb_ready, 1, 0) == -EINTR) {
+ return -EINTR;
+ }
+ spin_lock(&hb_cb_lock);
+ }
+ return 0;
+}
+
static int __init init_hb(void)
{
int retval=-1, i;
@@ -794,21 +807,7 @@
return 0;
}
-
-static inline int hb_wait_on_callback_state(int type)
-{
- while (hb_callback_state[type] == HB_CB_STATE_FROZEN) {
- spin_unlock(&hb_cb_lock);
- atomic_set(&hb_cb_ready, 0);
- if (util_wait_atomic_eq(&hb_cb_wq, &hb_cb_ready, 1, 0) == -EINTR) {
- return -EINTR;
- }
- spin_lock(&hb_cb_lock);
- }
- return 0;
-}
-
int hb_register_callback(int type, hb_cb_func *func, void *data, int priority)
{
hb_callback_func *f, *tmp;
Modified: trunk/src/dlmglue.c
===================================================================
--- trunk/src/dlmglue.c 2004-12-24 08:36:37 UTC (rev 1719)
+++ trunk/src/dlmglue.c 2004-12-24 23:06:42 UTC (rev 1720)
@@ -418,6 +418,20 @@
LOG_EXIT();
}
+/* WARNING: This function lives in a world where the only three lock
+ * levels are EX, PR, and NL. It *will* have to be adjusted when more
+ * lock types are added. */
+static inline int ocfs2_highest_compat_lock_level(int level)
+{
+ int new_level = LKM_EXMODE;
+
+ if (level == LKM_EXMODE)
+ new_level = LKM_NLMODE;
+ else if (level == LKM_PRMODE)
+ new_level = LKM_PRMODE;
+ return new_level;
+}
+
static inline void ocfs2_generic_handle_downconvert_action(ocfs2_lock_res *lockres)
{
LOG_ENTRY();
@@ -1616,20 +1630,6 @@
return status;
}
-/* WARNING: This function lives in a world where the only three lock
- * levels are EX, PR, and NL. It *will* have to be adjusted when more
- * lock types are added. */
-static inline int ocfs2_highest_compat_lock_level(int level)
-{
- int new_level = LKM_EXMODE;
-
- if (level == LKM_EXMODE)
- new_level = LKM_NLMODE;
- else if (level == LKM_PRMODE)
- new_level = LKM_PRMODE;
- return new_level;
-}
-
/* called with the spinlock held, and WILL drop it. */
static int __ocfs2_downconvert_lock(ocfs_super *osb,
ocfs2_lock_res *lockres,
More information about the Ocfs2-commits
mailing list