.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /****************************************************************************** |
---|
2 | 3 | ******************************************************************************* |
---|
3 | 4 | ** |
---|
4 | 5 | ** Copyright (C) 2005-2009 Red Hat, Inc. All rights reserved. |
---|
5 | 6 | ** |
---|
6 | | -** This copyrighted material is made available to anyone wishing to use, |
---|
7 | | -** modify, copy, or redistribute it subject to the terms and conditions |
---|
8 | | -** of the GNU General Public License v.2. |
---|
9 | 7 | ** |
---|
10 | 8 | ******************************************************************************* |
---|
11 | 9 | ******************************************************************************/ |
---|
.. | .. |
---|
740 | 738 | debugfs_remove(ls->ls_debug_toss_dentry); |
---|
741 | 739 | } |
---|
742 | 740 | |
---|
743 | | -int dlm_create_debug_file(struct dlm_ls *ls) |
---|
| 741 | +void dlm_create_debug_file(struct dlm_ls *ls) |
---|
744 | 742 | { |
---|
745 | 743 | char name[DLM_LOCKSPACE_LEN + 8]; |
---|
746 | 744 | |
---|
.. | .. |
---|
751 | 749 | dlm_root, |
---|
752 | 750 | ls, |
---|
753 | 751 | &format1_fops); |
---|
754 | | - if (!ls->ls_debug_rsb_dentry) |
---|
755 | | - goto fail; |
---|
756 | 752 | |
---|
757 | 753 | /* format 2 */ |
---|
758 | 754 | |
---|
.. | .. |
---|
764 | 760 | dlm_root, |
---|
765 | 761 | ls, |
---|
766 | 762 | &format2_fops); |
---|
767 | | - if (!ls->ls_debug_locks_dentry) |
---|
768 | | - goto fail; |
---|
769 | 763 | |
---|
770 | 764 | /* format 3 */ |
---|
771 | 765 | |
---|
.. | .. |
---|
777 | 771 | dlm_root, |
---|
778 | 772 | ls, |
---|
779 | 773 | &format3_fops); |
---|
780 | | - if (!ls->ls_debug_all_dentry) |
---|
781 | | - goto fail; |
---|
782 | 774 | |
---|
783 | 775 | /* format 4 */ |
---|
784 | 776 | |
---|
.. | .. |
---|
790 | 782 | dlm_root, |
---|
791 | 783 | ls, |
---|
792 | 784 | &format4_fops); |
---|
793 | | - if (!ls->ls_debug_toss_dentry) |
---|
794 | | - goto fail; |
---|
795 | 785 | |
---|
796 | 786 | memset(name, 0, sizeof(name)); |
---|
797 | 787 | snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_waiters", ls->ls_name); |
---|
.. | .. |
---|
801 | 791 | dlm_root, |
---|
802 | 792 | ls, |
---|
803 | 793 | &waiters_fops); |
---|
804 | | - if (!ls->ls_debug_waiters_dentry) |
---|
805 | | - goto fail; |
---|
806 | | - |
---|
807 | | - return 0; |
---|
808 | | - |
---|
809 | | - fail: |
---|
810 | | - dlm_delete_debug_file(ls); |
---|
811 | | - return -ENOMEM; |
---|
812 | 794 | } |
---|
813 | 795 | |
---|
814 | | -int __init dlm_register_debugfs(void) |
---|
| 796 | +void __init dlm_register_debugfs(void) |
---|
815 | 797 | { |
---|
816 | 798 | mutex_init(&debug_buf_lock); |
---|
817 | 799 | dlm_root = debugfs_create_dir("dlm", NULL); |
---|
818 | | - return dlm_root ? 0 : -ENOMEM; |
---|
819 | 800 | } |
---|
820 | 801 | |
---|
821 | 802 | void dlm_unregister_debugfs(void) |
---|