diff options
Diffstat (limited to 'fs/configfs/mount.c')
-rw-r--r-- | fs/configfs/mount.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index cfd91320e869..13c93715864b 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/mount.h> | 29 | #include <linux/mount.h> |
30 | #include <linux/fs_context.h> | ||
30 | #include <linux/pagemap.h> | 31 | #include <linux/pagemap.h> |
31 | #include <linux/init.h> | 32 | #include <linux/init.h> |
32 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
@@ -66,7 +67,7 @@ static struct configfs_dirent configfs_root = { | |||
66 | .s_iattr = NULL, | 67 | .s_iattr = NULL, |
67 | }; | 68 | }; |
68 | 69 | ||
69 | static int configfs_fill_super(struct super_block *sb, void *data, int silent) | 70 | static int configfs_fill_super(struct super_block *sb, struct fs_context *fc) |
70 | { | 71 | { |
71 | struct inode *inode; | 72 | struct inode *inode; |
72 | struct dentry *root; | 73 | struct dentry *root; |
@@ -102,16 +103,25 @@ static int configfs_fill_super(struct super_block *sb, void *data, int silent) | |||
102 | return 0; | 103 | return 0; |
103 | } | 104 | } |
104 | 105 | ||
105 | static struct dentry *configfs_do_mount(struct file_system_type *fs_type, | 106 | static int configfs_get_tree(struct fs_context *fc) |
106 | int flags, const char *dev_name, void *data) | ||
107 | { | 107 | { |
108 | return mount_single(fs_type, flags, data, configfs_fill_super); | 108 | return get_tree_single(fc, configfs_fill_super); |
109 | } | ||
110 | |||
111 | static const struct fs_context_operations configfs_context_ops = { | ||
112 | .get_tree = configfs_get_tree, | ||
113 | }; | ||
114 | |||
115 | static int configfs_init_fs_context(struct fs_context *fc) | ||
116 | { | ||
117 | fc->ops = &configfs_context_ops; | ||
118 | return 0; | ||
109 | } | 119 | } |
110 | 120 | ||
111 | static struct file_system_type configfs_fs_type = { | 121 | static struct file_system_type configfs_fs_type = { |
112 | .owner = THIS_MODULE, | 122 | .owner = THIS_MODULE, |
113 | .name = "configfs", | 123 | .name = "configfs", |
114 | .mount = configfs_do_mount, | 124 | .init_fs_context = configfs_init_fs_context, |
115 | .kill_sb = kill_litter_super, | 125 | .kill_sb = kill_litter_super, |
116 | }; | 126 | }; |
117 | MODULE_ALIAS_FS("configfs"); | 127 | MODULE_ALIAS_FS("configfs"); |