summaryrefslogtreecommitdiff
path: root/fs/openpromfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-03-25 16:38:30 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2019-07-04 22:01:59 -0400
commit7ab2fa7693c3f0ce8445fd4e9e4e58e34e6a2213 (patch)
tree3fd7844671a1daa85d9c6576b5ea907b6db16d43 /fs/openpromfs
parent2345771f87dfd53c1c38a64be1638658ef31f460 (diff)
vfs: Convert openpromfs to use the new mount API
Convert the openpromfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/openpromfs')
-rw-r--r--fs/openpromfs/inode.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index 46655e454c55..74502de3f8d9 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -8,6 +8,7 @@
#include <linux/types.h>
#include <linux/string.h>
#include <linux/fs.h>
+#include <linux/fs_context.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/seq_file.h>
@@ -374,7 +375,7 @@ static const struct super_operations openprom_sops = {
.remount_fs = openprom_remount,
};
-static int openprom_fill_super(struct super_block *s, void *data, int silent)
+static int openprom_fill_super(struct super_block *s, struct fs_context *fc)
{
struct inode *root_inode;
struct op_inode_info *oi;
@@ -408,16 +409,25 @@ out_no_root:
return ret;
}
-static struct dentry *openprom_mount(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data)
+static int openpromfs_get_tree(struct fs_context *fc)
{
- return mount_single(fs_type, flags, data, openprom_fill_super);
+ return get_tree_single(fc, openprom_fill_super);
+}
+
+static const struct fs_context_operations openpromfs_context_ops = {
+ .get_tree = openpromfs_get_tree,
+};
+
+static int openpromfs_init_fs_context(struct fs_context *fc)
+{
+ fc->ops = &openpromfs_context_ops;
+ return 0;
}
static struct file_system_type openprom_fs_type = {
.owner = THIS_MODULE,
.name = "openpromfs",
- .mount = openprom_mount,
+ .init_fs_context = openpromfs_init_fs_context,
.kill_sb = kill_anon_super,
};
MODULE_ALIAS_FS("openpromfs");