]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/dlmglue.c
ocfs2: Fill node number during cluster stack init
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / dlmglue.c
index 05fd016ba4bf4a327336acb556659ce1b8fbda1d..c7653bb343e1a4d43d5efaacc1030d61b2d0c2d8 100644 (file)
@@ -2459,8 +2459,10 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
 
        mlog_entry_void();
 
-       if (ocfs2_mount_local(osb))
+       if (ocfs2_mount_local(osb)) {
+               osb->node_num = 0;
                goto local;
+       }
 
        status = ocfs2_dlm_init_debug(osb);
        if (status < 0) {
@@ -2487,6 +2489,15 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
                goto bail;
        }
 
+       status = ocfs2_cluster_this_node(&osb->node_num);
+       if (status < 0) {
+               mlog_errno(status);
+               mlog(ML_ERROR,
+                    "could not find this host's node number\n");
+               ocfs2_cluster_disconnect(conn);
+               goto bail;
+       }
+
 local:
        ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb);
        ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb);