]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
vfs: Convert drm to use the new mount API
authorDavid Howells <dhowells@redhat.com>
Mon, 25 Mar 2019 16:38:24 +0000 (16:38 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 May 2019 22:06:13 +0000 (18:06 -0400)
Convert the drm filesystem to the new internal mount API as the old
one will be obsoleted and removed.  This allows greater flexibility in
communication of mount parameters between userspace, the VFS and the
filesystem.

See Documentation/filesystems/mount_api.txt for more information.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
cc: David Airlie <airlied@linux.ie>
cc: dri-devel@lists.freedesktop.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/gpu/drm/drm_drv.c

index 48365c62a190ae18333eaaa015721634a906eeb3..f23eb993c4fa1b9075ebb2149aa8e97a10d9a436 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/mount.h>
+#include <linux/pseudo_fs.h>
 #include <linux/slab.h>
 #include <linux/srcu.h>
 
@@ -532,16 +533,15 @@ EXPORT_SYMBOL(drm_dev_unplug);
 static int drm_fs_cnt;
 static struct vfsmount *drm_fs_mnt;
 
-static struct dentry *drm_fs_mount(struct file_system_type *fs_type, int flags,
-                                  const char *dev_name, void *data)
+static int drm_fs_init_fs_context(struct fs_context *fc)
 {
-       return mount_pseudo(fs_type, NULL, NULL, 0x010203ff);
+       return init_pseudo(fc, 0x010203ff) ? 0 : -ENOMEM;
 }
 
 static struct file_system_type drm_fs_type = {
        .name           = "drm",
        .owner          = THIS_MODULE,
-       .mount          = drm_fs_mount,
+       .init_fs_context = drm_fs_init_fs_context,
        .kill_sb        = kill_anon_super,
 };