libnvdimm/altmap: Track namespace boundaries in altmap
[linux-2.6-block.git] / drivers / dma-buf / dma-buf.c
index dc4b2c521d79a0d3fb2869d7a7da0c378f0dd1f6..f45bfb29ef960346ae122dc94c067286fcf8c7de 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/reservation.h>
 #include <linux/mm.h>
 #include <linux/mount.h>
+#include <linux/pseudo_fs.h>
 
 #include <uapi/linux/dma-buf.h>
 #include <uapi/linux/magic.h>
@@ -59,16 +60,20 @@ static const struct dentry_operations dma_buf_dentry_ops = {
 
 static struct vfsmount *dma_buf_mnt;
 
-static struct dentry *dma_buf_fs_mount(struct file_system_type *fs_type,
-               int flags, const char *name, void *data)
+static int dma_buf_fs_init_context(struct fs_context *fc)
 {
-       return mount_pseudo(fs_type, "dmabuf:", NULL, &dma_buf_dentry_ops,
-                       DMA_BUF_MAGIC);
+       struct pseudo_fs_context *ctx;
+
+       ctx = init_pseudo(fc, DMA_BUF_MAGIC);
+       if (!ctx)
+               return -ENOMEM;
+       ctx->dops = &dma_buf_dentry_ops;
+       return 0;
 }
 
 static struct file_system_type dma_buf_fs_type = {
        .name = "dmabuf",
-       .mount = dma_buf_fs_mount,
+       .init_fs_context = dma_buf_fs_init_context,
        .kill_sb = kill_anon_super,
 };