Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / mm / z3fold.c
index 6c72b18d8b9cbc9534fd008c16aca33ba539598f..1a029a7432ee56635f9dcde8f4c5ad2b1e2984ed 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/atomic.h>
 #include <linux/sched.h>
 #include <linux/cpumask.h>
-#include <linux/dcache.h>
 #include <linux/list.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/compaction.h>
 #include <linux/percpu.h>
 #include <linux/mount.h>
+#include <linux/pseudo_fs.h>
 #include <linux/fs.h>
 #include <linux/preempt.h>
 #include <linux/workqueue.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/zpool.h>
+#include <linux/magic.h>
 
 /*
  * NCHUNKS_ORDER determines the internal allocation granularity, effectively
@@ -245,19 +246,14 @@ static inline void free_handle(unsigned long handle)
        }
 }
 
-static struct dentry *z3fold_do_mount(struct file_system_type *fs_type,
-                               int flags, const char *dev_name, void *data)
+static int z3fold_init_fs_context(struct fs_context *fc)
 {
-       static const struct dentry_operations ops = {
-               .d_dname = simple_dname,
-       };
-
-       return mount_pseudo(fs_type, "z3fold:", NULL, &ops, 0x33);
+       return init_pseudo(fc, Z3FOLD_MAGIC) ? 0 : -ENOMEM;
 }
 
 static struct file_system_type z3fold_fs = {
        .name           = "z3fold",
-       .mount          = z3fold_do_mount,
+       .init_fs_context = z3fold_init_fs_context,
        .kill_sb        = kill_anon_super,
 };