]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ocfs2/dlmglue.c
usb: use get/put_unaligned_* helpers
[mv-sheeva.git] / fs / ocfs2 / dlmglue.c
index b640423b936ab46668276b483da8e4bd54942c53..394d25a131a54d406b4fd9422639cde7c1d7c320 100644 (file)
@@ -2627,7 +2627,8 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
        }
 
        /* for now, uuid == domain */
-       status = ocfs2_cluster_connect(osb->uuid_str,
+       status = ocfs2_cluster_connect(osb->osb_cluster_stack,
+                                      osb->uuid_str,
                                       strlen(osb->uuid_str),
                                       ocfs2_do_node_down, osb,
                                       &conn);
@@ -2641,7 +2642,7 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
                mlog_errno(status);
                mlog(ML_ERROR,
                     "could not find this host's node number\n");
-               ocfs2_cluster_disconnect(conn);
+               ocfs2_cluster_disconnect(conn, 0);
                goto bail;
        }
 
@@ -2663,7 +2664,8 @@ bail:
        return status;
 }
 
-void ocfs2_dlm_shutdown(struct ocfs2_super *osb)
+void ocfs2_dlm_shutdown(struct ocfs2_super *osb,
+                       int hangup_pending)
 {
        mlog_entry_void();
 
@@ -2683,7 +2685,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb)
        ocfs2_lock_res_free(&osb->osb_super_lockres);
        ocfs2_lock_res_free(&osb->osb_rename_lockres);
 
-       ocfs2_cluster_disconnect(osb->cconn);
+       ocfs2_cluster_disconnect(osb->cconn, hangup_pending);
        osb->cconn = NULL;
 
        ocfs2_dlm_shutdown_debug(osb);
@@ -2803,8 +2805,7 @@ static int ocfs2_drop_lock(struct ocfs2_super *osb,
        if (ret) {
                ocfs2_log_dlm_error("ocfs2_dlm_unlock", ret, lockres);
                mlog(ML_ERROR, "lockres flags: %lu\n", lockres->l_flags);
-               /* XXX Need to abstract this */
-               dlm_print_one_lock(lockres->l_lksb.lksb_o2dlm.lockid);
+               ocfs2_dlm_dump_lksb(&lockres->l_lksb);
                BUG();
        }
        mlog(0, "lock %s, successfull return from ocfs2_dlm_unlock\n",
@@ -3367,16 +3368,11 @@ static struct ocfs2_locking_protocol lproto = {
        .lp_unlock_ast          = ocfs2_unlock_ast,
 };
 
-/* This interface isn't the final one, hence the less-than-perfect names */
-void dlmglue_init_stack(void)
+void ocfs2_set_locking_protocol(void)
 {
-       o2cb_get_stack(&lproto);
+       ocfs2_stack_glue_set_locking_protocol(&lproto);
 }
 
-void dlmglue_exit_stack(void)
-{
-       o2cb_put_stack();
-}
 
 static void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
                                       struct ocfs2_lock_res *lockres)