[PATCH] ocfs2: complete failure recovery for nodemanager init
authorJeff Mahoney <jeffm@suse.com>
Wed, 22 Feb 2006 00:54:00 +0000 (16:54 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Wed, 1 Mar 2006 19:29:30 +0000 (11:29 -0800)
 This patch finishes cleaning up the node manager allocations if it fails
 to initialize.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/cluster/nodemanager.c

index cf7828f233618665f1165a335ff0326d71787b90..e1fceb8aa32d612973de79f9967f1b74f9bd0964 100644 (file)
@@ -756,7 +756,7 @@ static int __init init_o2nm(void)
        if (!ocfs2_table_header) {
                printk(KERN_ERR "nodemanager: unable to register sysctl\n");
                ret = -ENOMEM; /* or something. */
-               goto out;
+               goto out_o2net;
        }
 
        ret = o2net_register_hb_callbacks();
@@ -780,6 +780,8 @@ out_callbacks:
        o2net_unregister_hb_callbacks();
 out_sysctl:
        unregister_sysctl_table(ocfs2_table_header);
+out_o2net:
+       o2net_exit();
 out:
        return ret;
 }