From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Airlie <airlied@redhat.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] fs: export simple_dname for drm drivers.
Date: Mon, 20 Jan 2014 01:27:58 +0000 [thread overview]
Message-ID: <20140120012758.GQ10323@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1390179284-4824-1-git-send-email-airlied@redhat.com>
On Mon, Jan 20, 2014 at 10:54:44AM +1000, Dave Airlie wrote:
> David Herrmann's changes to use a pseudo filesystem for drm's shared
> inodes requires this be exported for drm to build as a module.
>
> I'd like to merge this via the drm tree, so please ack.
Having looked through these patches... The problem is that you'll get
your module impossible to unload. Sane solution:
static struct vfsmount *drm_mnt;
static int count;
struct inode *drm_alloc_inode(void)
{
struct inode *res;
int err = simple_pin_fs(&drm_fs, &drm_mnt, &count);
if (err)
return ERR_PTR(err);
res = alloc_anon_inode(drm_mnt->mnt_sb);
if (IS_ERR(res))
simple_release_fs(&drm_mnt, &count);
return res;
}
/* call from drm_free_dev() */
void drm_put_anon_inode(struct drm_device *dev)
{
iput(dev->anon_inode);
simple_release_fs(&drm_mnt, &count);
}
and lose those kern_mount/kern_umount.
prev parent reply other threads:[~2014-01-20 1:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 0:54 [PATCH] fs: export simple_dname for drm drivers Dave Airlie
2014-01-20 0:54 ` Dave Airlie
2014-01-20 1:27 ` Al Viro [this message]
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=20140120012758.GQ10323@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.