All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <clm@fb.com>
To: Martin Kepplinger <martink@posteo.de>
Cc: <linux-btrfs@vger.kernel.org>, <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>,
	Martin Kepplinger <martink@posteo.de>
Subject: Re: [PATCH] btrfs: Don't check for file->private_data on open(). It is set by the core.
Date: Wed, 12 Nov 2014 12:59:33 -0500	[thread overview]
Message-ID: <1415815173.25389.2@mail.thefacebook.com> (raw)
In-Reply-To: <1415810308-24243-1-git-send-email-martink@posteo.de>

On Wed, Nov 12, 2014 at 11:38 AM, Martin Kepplinger <martink@posteo.de> 
wrote:
> The miscdevice core now sets file->private_data to the struct 
> miscdevice
> so don't fail when this is not NULL.
> 
> Signed-off-by: Martin Kepplinger <martink@posteo.de>
> ---
> This is a question: what does this check provide and does overwriting
> file->private_data make any difference?
> 
> Is miscdevice's open() by the user not allowed here, if 
> file->private_data
> is set?
> 
> thanks!!

Btrfs uses this in the transaction start ioctl to record the 
transaction handle being started.  Ceph is the main user of the ioctl, 
and we could setup a hash table if needed.  But which call path in 
miscdevice is doing this?

With your patch in place, btrfs would end up overwriting the miscdevice 
private_data field, which would probably cause problems.

-chris


  reply	other threads:[~2014-11-12 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 16:38 [PATCH] btrfs: Don't check for file->private_data on open(). It is set by the core Martin Kepplinger
2014-11-12 17:59 ` Chris Mason [this message]
2014-11-12 18:34   ` Martin Kepplinger
2014-11-13 22:14     ` Al Viro

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=1415815173.25389.2@mail.thefacebook.com \
    --to=clm@fb.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martink@posteo.de \
    /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.