diff options
Diffstat (limited to 'security/inode.c')
-rw-r--r-- | security/inode.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/security/inode.c b/security/inode.c index fcff7f08bb1c..6c326939750d 100644 --- a/security/inode.c +++ b/security/inode.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sysfs.h> | 13 | #include <linux/sysfs.h> |
14 | #include <linux/kobject.h> | 14 | #include <linux/kobject.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/fs_context.h> | ||
16 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
17 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
@@ -36,7 +37,7 @@ static const struct super_operations securityfs_super_operations = { | |||
36 | .free_inode = securityfs_free_inode, | 37 | .free_inode = securityfs_free_inode, |
37 | }; | 38 | }; |
38 | 39 | ||
39 | static int fill_super(struct super_block *sb, void *data, int silent) | 40 | static int securityfs_fill_super(struct super_block *sb, struct fs_context *fc) |
40 | { | 41 | { |
41 | static const struct tree_descr files[] = {{""}}; | 42 | static const struct tree_descr files[] = {{""}}; |
42 | int error; | 43 | int error; |
@@ -50,17 +51,25 @@ static int fill_super(struct super_block *sb, void *data, int silent) | |||
50 | return 0; | 51 | return 0; |
51 | } | 52 | } |
52 | 53 | ||
53 | static struct dentry *get_sb(struct file_system_type *fs_type, | 54 | static int securityfs_get_tree(struct fs_context *fc) |
54 | int flags, const char *dev_name, | ||
55 | void *data) | ||
56 | { | 55 | { |
57 | return mount_single(fs_type, flags, data, fill_super); | 56 | return get_tree_single(fc, securityfs_fill_super); |
57 | } | ||
58 | |||
59 | static const struct fs_context_operations securityfs_context_ops = { | ||
60 | .get_tree = securityfs_get_tree, | ||
61 | }; | ||
62 | |||
63 | static int securityfs_init_fs_context(struct fs_context *fc) | ||
64 | { | ||
65 | fc->ops = &securityfs_context_ops; | ||
66 | return 0; | ||
58 | } | 67 | } |
59 | 68 | ||
60 | static struct file_system_type fs_type = { | 69 | static struct file_system_type fs_type = { |
61 | .owner = THIS_MODULE, | 70 | .owner = THIS_MODULE, |
62 | .name = "securityfs", | 71 | .name = "securityfs", |
63 | .mount = get_sb, | 72 | .init_fs_context = securityfs_init_fs_context, |
64 | .kill_sb = kill_litter_super, | 73 | .kill_sb = kill_litter_super, |
65 | }; | 74 | }; |
66 | 75 | ||