Switch open_exec() and sys_uselib() to do_open_filp()
[safe/jmp/linux-2.6] / fs / ocfs2 / heartbeat.c
index 80de239..c6e7213 100644 (file)
@@ -28,9 +28,6 @@
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/highmem.h>
-#include <linux/kmod.h>
-
-#include <dlm/dlmapi.h>
 
 #define MLOG_MASK_PREFIX ML_SUPER
 #include <cluster/masklog.h>
@@ -64,19 +61,20 @@ void ocfs2_init_node_maps(struct ocfs2_super *osb)
        ocfs2_node_map_init(&osb->osb_recovering_orphan_dirs);
 }
 
-static void ocfs2_do_node_down(int node_num,
-                              struct ocfs2_super *osb)
+void ocfs2_do_node_down(int node_num, void *data)
 {
+       struct ocfs2_super *osb = data;
+
        BUG_ON(osb->node_num == node_num);
 
        mlog(0, "ocfs2: node down event for %d\n", node_num);
 
-       if (!osb->dlm) {
+       if (!osb->cconn) {
                /*
-                * No DLM means we're not even ready to participate yet.
-                * We check the slots after the DLM comes up, so we will
-                * notice the node death then.  We can safely ignore it
-                * here.
+                * No cluster connection means we're not even ready to
+                * participate yet.  We check the slots after the cluster
+                * comes up, so we will notice the node death then.  We
+                * can safely ignore it here.
                 */
                return;
        }
@@ -84,61 +82,6 @@ static void ocfs2_do_node_down(int node_num,
        ocfs2_recovery_thread(osb, node_num);
 }
 
-/* Called from the dlm when it's about to evict a node. We may also
- * get a heartbeat callback later. */
-static void ocfs2_dlm_eviction_cb(int node_num,
-                                 void *data)
-{
-       struct ocfs2_super *osb = (struct ocfs2_super *) data;
-       struct super_block *sb = osb->sb;
-
-       mlog(ML_NOTICE, "device (%u,%u): dlm has evicted node %d\n",
-            MAJOR(sb->s_dev), MINOR(sb->s_dev), node_num);
-
-       ocfs2_do_node_down(node_num, osb);
-}
-
-void ocfs2_setup_hb_callbacks(struct ocfs2_super *osb)
-{
-       /* Not exactly a heartbeat callback, but leads to essentially
-        * the same path so we set it up here. */
-       dlm_setup_eviction_cb(&osb->osb_eviction_cb,
-                             ocfs2_dlm_eviction_cb,
-                             osb);
-}
-
-void ocfs2_stop_heartbeat(struct ocfs2_super *osb)
-{
-       int ret;
-       char *argv[5], *envp[3];
-
-       if (ocfs2_mount_local(osb))
-               return;
-
-       if (!osb->uuid_str) {
-               /* This can happen if we don't get far enough in mount... */
-               mlog(0, "No UUID with which to stop heartbeat!\n\n");
-               return;
-       }
-
-       argv[0] = (char *)o2nm_get_hb_ctl_path();
-       argv[1] = "-K";
-       argv[2] = "-u";
-       argv[3] = osb->uuid_str;
-       argv[4] = NULL;
-
-       mlog(0, "Run: %s %s %s %s\n", argv[0], argv[1], argv[2], argv[3]);
-
-       /* minimal command environment taken from cpu_run_sbin_hotplug */
-       envp[0] = "HOME=/";
-       envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
-       envp[2] = NULL;
-
-       ret = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
-       if (ret < 0)
-               mlog_errno(ret);
-}
-
 static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map,
                                            int bit)
 {