| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* -*- mode: c; c-basic-offset: 8; -*- |
|---|
| 2 | 3 | * vim: noexpandtab sw=8 ts=8 sts=0: |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * cluster stacks. |
|---|
| 8 | 9 | * |
|---|
| 9 | 10 | * 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. |
|---|
| 19 | 11 | */ |
|---|
| 20 | 12 | |
|---|
| 21 | 13 | #include <linux/list.h> |
|---|
| .. | .. |
|---|
| 660 | 652 | * and easier to preserve the name. |
|---|
| 661 | 653 | */ |
|---|
| 662 | 654 | |
|---|
| 663 | | -#define FS_OCFS2_NM 1 |
|---|
| 664 | | - |
|---|
| 665 | 655 | static struct ctl_table ocfs2_nm_table[] = { |
|---|
| 666 | 656 | { |
|---|
| 667 | 657 | .procname = "hb_ctl_path", |
|---|
| .. | .. |
|---|
| 715 | 705 | |
|---|
| 716 | 706 | static int __init ocfs2_stack_glue_init(void) |
|---|
| 717 | 707 | { |
|---|
| 708 | + int ret; |
|---|
| 709 | + |
|---|
| 718 | 710 | strcpy(cluster_stack_name, OCFS2_STACK_PLUGIN_O2CB); |
|---|
| 719 | 711 | |
|---|
| 720 | 712 | ocfs2_table_header = register_sysctl_table(ocfs2_root_table); |
|---|
| .. | .. |
|---|
| 724 | 716 | return -ENOMEM; /* or something. */ |
|---|
| 725 | 717 | } |
|---|
| 726 | 718 | |
|---|
| 727 | | - return ocfs2_sysfs_init(); |
|---|
| 719 | + ret = ocfs2_sysfs_init(); |
|---|
| 720 | + if (ret) |
|---|
| 721 | + unregister_sysctl_table(ocfs2_table_header); |
|---|
| 722 | + |
|---|
| 723 | + return ret; |
|---|
| 728 | 724 | } |
|---|
| 729 | 725 | |
|---|
| 730 | 726 | static void __exit ocfs2_stack_glue_exit(void) |
|---|