hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/fs/ocfs2/stackglue.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* -*- mode: c; c-basic-offset: 8; -*-
23 * vim: noexpandtab sw=8 ts=8 sts=0:
34 *
....@@ -7,15 +8,6 @@
78 * cluster stacks.
89 *
910 * Copyright (C) 2007, 2009 Oracle. All rights reserved.
10
- *
11
- * This program is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public
13
- * License as published by the Free Software Foundation, version 2.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * General Public License for more details.
1911 */
2012
2113 #include <linux/list.h>
....@@ -660,8 +652,6 @@
660652 * and easier to preserve the name.
661653 */
662654
663
-#define FS_OCFS2_NM 1
664
-
665655 static struct ctl_table ocfs2_nm_table[] = {
666656 {
667657 .procname = "hb_ctl_path",
....@@ -715,6 +705,8 @@
715705
716706 static int __init ocfs2_stack_glue_init(void)
717707 {
708
+ int ret;
709
+
718710 strcpy(cluster_stack_name, OCFS2_STACK_PLUGIN_O2CB);
719711
720712 ocfs2_table_header = register_sysctl_table(ocfs2_root_table);
....@@ -724,7 +716,11 @@
724716 return -ENOMEM; /* or something. */
725717 }
726718
727
- return ocfs2_sysfs_init();
719
+ ret = ocfs2_sysfs_init();
720
+ if (ret)
721
+ unregister_sysctl_table(ocfs2_table_header);
722
+
723
+ return ret;
728724 }
729725
730726 static void __exit ocfs2_stack_glue_exit(void)