hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/misc/ibmasm/ibmasmfs.c
....@@ -1,24 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * IBM ASM Service Processor Device Driver
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
174 *
185 * Copyright (C) IBM Corporation, 2004
196 *
207 * Author: Max Asböck <amax@us.ibm.com>
21
- *
228 */
239
2410 /*
....@@ -74,6 +60,7 @@
7460 */
7561
7662 #include <linux/fs.h>
63
+#include <linux/fs_context.h>
7764 #include <linux/pagemap.h>
7865 #include <linux/slab.h>
7966 #include <linux/uaccess.h>
....@@ -88,13 +75,21 @@
8875
8976 static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode);
9077 static void ibmasmfs_create_files (struct super_block *sb);
91
-static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent);
78
+static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc);
9279
93
-
94
-static struct dentry *ibmasmfs_mount(struct file_system_type *fst,
95
- int flags, const char *name, void *data)
80
+static int ibmasmfs_get_tree(struct fs_context *fc)
9681 {
97
- return mount_single(fst, flags, data, ibmasmfs_fill_super);
82
+ return get_tree_single(fc, ibmasmfs_fill_super);
83
+}
84
+
85
+static const struct fs_context_operations ibmasmfs_context_ops = {
86
+ .get_tree = ibmasmfs_get_tree,
87
+};
88
+
89
+static int ibmasmfs_init_fs_context(struct fs_context *fc)
90
+{
91
+ fc->ops = &ibmasmfs_context_ops;
92
+ return 0;
9893 }
9994
10095 static const struct super_operations ibmasmfs_s_ops = {
....@@ -107,12 +102,12 @@
107102 static struct file_system_type ibmasmfs_type = {
108103 .owner = THIS_MODULE,
109104 .name = "ibmasmfs",
110
- .mount = ibmasmfs_mount,
105
+ .init_fs_context = ibmasmfs_init_fs_context,
111106 .kill_sb = kill_litter_super,
112107 };
113108 MODULE_ALIAS_FS("ibmasmfs");
114109
115
-static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent)
110
+static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc)
116111 {
117112 struct inode *root;
118113