Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / security / selinux / selinuxfs.c
index 6f195c7..e6c7643 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
+#include <linux/fs_context.h>
 #include <linux/mount.h>
 #include <linux/mutex.h>
 #include <linux/init.h>
@@ -1891,7 +1892,7 @@ static struct dentry *sel_make_dir(struct dentry *dir, const char *name,
 
 #define NULL_FILE_NAME "null"
 
-static int sel_fill_super(struct super_block *sb, void *data, int silent)
+static int sel_fill_super(struct super_block *sb, struct fs_context *fc)
 {
        struct selinux_fs_info *fsi;
        int ret;
@@ -2007,10 +2008,19 @@ err:
        return ret;
 }
 
-static struct dentry *sel_mount(struct file_system_type *fs_type,
-                     int flags, const char *dev_name, void *data)
+static int sel_get_tree(struct fs_context *fc)
 {
-       return mount_single(fs_type, flags, data, sel_fill_super);
+       return get_tree_single(fc, sel_fill_super);
+}
+
+static const struct fs_context_operations sel_context_ops = {
+       .get_tree       = sel_get_tree,
+};
+
+static int sel_init_fs_context(struct fs_context *fc)
+{
+       fc->ops = &sel_context_ops;
+       return 0;
 }
 
 static void sel_kill_sb(struct super_block *sb)
@@ -2021,7 +2031,7 @@ static void sel_kill_sb(struct super_block *sb)
 
 static struct file_system_type sel_fs_type = {
        .name           = "selinuxfs",
-       .mount          = sel_mount,
+       .init_fs_context = sel_init_fs_context,
        .kill_sb        = sel_kill_sb,
 };