| .. | .. |
|---|
| 14 | 14 | #include <linux/module.h> |
|---|
| 15 | 15 | #include <linux/oprofile.h> |
|---|
| 16 | 16 | #include <linux/fs.h> |
|---|
| 17 | +#include <linux/fs_context.h> |
|---|
| 17 | 18 | #include <linux/pagemap.h> |
|---|
| 18 | 19 | #include <linux/uaccess.h> |
|---|
| 19 | 20 | |
|---|
| .. | .. |
|---|
| 238 | 239 | } |
|---|
| 239 | 240 | |
|---|
| 240 | 241 | |
|---|
| 241 | | -static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) |
|---|
| 242 | +static int oprofilefs_fill_super(struct super_block *sb, struct fs_context *fc) |
|---|
| 242 | 243 | { |
|---|
| 243 | 244 | struct inode *root_inode; |
|---|
| 244 | 245 | |
|---|
| .. | .. |
|---|
| 263 | 264 | return 0; |
|---|
| 264 | 265 | } |
|---|
| 265 | 266 | |
|---|
| 266 | | - |
|---|
| 267 | | -static struct dentry *oprofilefs_mount(struct file_system_type *fs_type, |
|---|
| 268 | | - int flags, const char *dev_name, void *data) |
|---|
| 267 | +static int oprofilefs_get_tree(struct fs_context *fc) |
|---|
| 269 | 268 | { |
|---|
| 270 | | - return mount_single(fs_type, flags, data, oprofilefs_fill_super); |
|---|
| 269 | + return get_tree_single(fc, oprofilefs_fill_super); |
|---|
| 271 | 270 | } |
|---|
| 272 | 271 | |
|---|
| 272 | +static const struct fs_context_operations oprofilefs_context_ops = { |
|---|
| 273 | + .get_tree = oprofilefs_get_tree, |
|---|
| 274 | +}; |
|---|
| 275 | + |
|---|
| 276 | +static int oprofilefs_init_fs_context(struct fs_context *fc) |
|---|
| 277 | +{ |
|---|
| 278 | + fc->ops = &oprofilefs_context_ops; |
|---|
| 279 | + return 0; |
|---|
| 280 | +} |
|---|
| 273 | 281 | |
|---|
| 274 | 282 | static struct file_system_type oprofilefs_type = { |
|---|
| 275 | 283 | .owner = THIS_MODULE, |
|---|
| 276 | 284 | .name = "oprofilefs", |
|---|
| 277 | | - .mount = oprofilefs_mount, |
|---|
| 285 | + .init_fs_context = oprofilefs_init_fs_context, |
|---|
| 278 | 286 | .kill_sb = kill_litter_super, |
|---|
| 279 | 287 | }; |
|---|
| 280 | 288 | MODULE_ALIAS_FS("oprofilefs"); |
|---|