dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: David Howells <dhowells@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH 14/68] vfs: Convert drm to use the new mount API
Date: Thu, 28 Mar 2019 08:47:12 +0100	[thread overview]
Message-ID: <20190328074712.GQ2665@phenom.ffwll.local> (raw)
In-Reply-To: <155373013865.7602.4323790421889477990.stgit@warthog.procyon.org.uk>

On Wed, Mar 27, 2019 at 11:42:18PM +0000, David Howells wrote:
> 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>
> cc: David Airlie <airlied@linux.ie>
> cc: Daniel Vetter <daniel@ffwll.ch>
> cc: dri-devel@lists.freedesktop.org

No clue about vfs, but feel free to merge through whatever tree this is
suitable for.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
> 
>  drivers/gpu/drm/drm_drv.c |   14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 381581b01d48..9eead5a478de 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -31,6 +31,7 @@
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
>  #include <linux/mount.h>
> +#include <linux/fs_context.h>
>  #include <linux/slab.h>
>  #include <linux/srcu.h>
>  
> @@ -413,20 +414,17 @@ static const struct super_operations drm_fs_sops = {
>  	.statfs		= simple_statfs,
>  };
>  
> -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,
> -			    "drm:",
> -			    &drm_fs_sops,
> -			    &drm_fs_dops,
> -			    0x010203ff);
> +	return vfs_init_pseudo_fs_context(fc, "drm:",
> +					  &drm_fs_sops, NULL,
> +					  &drm_fs_dops, 0x010203ff);
>  }
>  
>  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,
>  };
>  
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-03-28  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27 23:40 [RFC PATCH 00/68] VFS: Convert a bunch of filesystems to the new mount API David Howells
2019-03-27 23:42 ` [RFC PATCH 14/68] vfs: Convert drm to use " David Howells
2019-03-28  7:47   ` Daniel Vetter [this message]
2019-04-10  9:59     ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190328074712.GQ2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dhowells@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox