hypfs_dbfs.c (597473720f4dc69749542bfcfed4a927a43d935e) hypfs_dbfs.c (3325b4d85799957aa53514e69bed5c9df7771caf)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Hypervisor filesystem for Linux on s390 - debugfs interface
4 *
5 * Copyright IBM Corp. 2010
6 * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
7 */
8

--- 76 unchanged lines hidden (view full) ---

85 mutex_init(&df->lock);
86}
87
88void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df)
89{
90 debugfs_remove(df->dentry);
91}
92
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Hypervisor filesystem for Linux on s390 - debugfs interface
4 *
5 * Copyright IBM Corp. 2010
6 * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
7 */
8

--- 76 unchanged lines hidden (view full) ---

85 mutex_init(&df->lock);
86}
87
88void hypfs_dbfs_remove_file(struct hypfs_dbfs_file *df)
89{
90 debugfs_remove(df->dentry);
91}
92
93void hypfs_dbfs_init(void)
93static int __init hypfs_dbfs_init(void)
94{
94{
95 int rc = -ENODATA;
96
95 dbfs_dir = debugfs_create_dir("s390_hypfs", NULL);
97 dbfs_dir = debugfs_create_dir("s390_hypfs", NULL);
96}
98 if (hypfs_diag_init())
99 goto fail_dbfs_exit;
100 if (hypfs_vm_init())
101 goto fail_hypfs_diag_exit;
102 hypfs_sprp_init();
103 if (hypfs_diag0c_init())
104 goto fail_hypfs_sprp_exit;
105 rc = hypfs_fs_init();
106 if (rc)
107 goto fail_hypfs_diag0c_exit;
108 return 0;
97
109
98void hypfs_dbfs_exit(void)
99{
110fail_hypfs_diag0c_exit:
111 hypfs_diag0c_exit();
112fail_hypfs_sprp_exit:
113 hypfs_sprp_exit();
114 hypfs_vm_exit();
115fail_hypfs_diag_exit:
116 hypfs_diag_exit();
117 pr_err("Initialization of hypfs failed with rc=%i\n", rc);
118fail_dbfs_exit:
100 debugfs_remove(dbfs_dir);
119 debugfs_remove(dbfs_dir);
120 return rc;
101}
121}
122device_initcall(hypfs_dbfs_init)