hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/xen/xenfs/super.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * xenfs.c - a filesystem for passing info between the a domain and
34 * the hypervisor.
....@@ -13,6 +14,7 @@
1314 #include <linux/errno.h>
1415 #include <linux/module.h>
1516 #include <linux/fs.h>
17
+#include <linux/fs_context.h>
1618 #include <linux/magic.h>
1719
1820 #include <xen/xen.h>
....@@ -42,7 +44,7 @@
4244 .llseek = default_llseek,
4345 };
4446
45
-static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
47
+static int xenfs_fill_super(struct super_block *sb, struct fs_context *fc)
4648 {
4749 static const struct tree_descr xenfs_files[] = {
4850 [2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
....@@ -67,17 +69,25 @@
6769 xen_initial_domain() ? xenfs_init_files : xenfs_files);
6870 }
6971
70
-static struct dentry *xenfs_mount(struct file_system_type *fs_type,
71
- int flags, const char *dev_name,
72
- void *data)
72
+static int xenfs_get_tree(struct fs_context *fc)
7373 {
74
- return mount_single(fs_type, flags, data, xenfs_fill_super);
74
+ return get_tree_single(fc, xenfs_fill_super);
75
+}
76
+
77
+static const struct fs_context_operations xenfs_context_ops = {
78
+ .get_tree = xenfs_get_tree,
79
+};
80
+
81
+static int xenfs_init_fs_context(struct fs_context *fc)
82
+{
83
+ fc->ops = &xenfs_context_ops;
84
+ return 0;
7585 }
7686
7787 static struct file_system_type xenfs_type = {
7888 .owner = THIS_MODULE,
7989 .name = "xenfs",
80
- .mount = xenfs_mount,
90
+ .init_fs_context = xenfs_init_fs_context,
8191 .kill_sb = kill_litter_super,
8292 };
8393 MODULE_ALIAS_FS("xenfs");