All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Nick Piggin <npiggin@suse.de>,
	linux-kernel@vger.kernel.org, akpm <akpm@linuxfoundation.org>
Subject: Re: mnt_want_write_file() has problem?
Date: Sat, 12 Sep 2009 14:39:44 +0100	[thread overview]
Message-ID: <20090912133944.GB5858@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1249413319.11056.131.camel@nimitz>

On Tue, Aug 04, 2009 at 12:15:19PM -0700, Dave Hansen wrote:
> On Mon, 2009-08-03 at 06:36 +0900, OGAWA Hirofumi wrote:
> > diff -puN fs/namespace.c~mnt_want_write-wrong-assume fs/namespace.c
> > ---
> > linux-2.6/fs/namespace.c~mnt_want_write-wrong-assume        2009-08-03
> > 04:33:35.000000000 +0900
> > +++ linux-2.6-hirofumi/fs/namespace.c   2009-08-03 04:31:34.000000000
> > +0900
> > @@ -316,7 +316,8 @@ EXPORT_SYMBOL_GPL(mnt_clone_write);
> >   */
> >  int mnt_want_write_file(struct file *file)
> >  {
> > -       if (!(file->f_mode & FMODE_WRITE))
> > +       struct inode *inode = file->f_dentry->d_inode;
> > +       if (!(file->f_mode & FMODE_WRITE) || special_file(inode->i_mode))
> >                 return mnt_want_write(file->f_path.mnt);
> >         else
> >                 return mnt_clone_write(file->f_path.mnt);
> 
> I'm fine with this.  I'd like a debugging check in mnt_clone_write()
> since this bug is easy to detect, but such a check will also cost all of
> the performance gains that Nick added.  So, we can't have it
> unconditionally.

[Very belated] ACK.

      parent reply	other threads:[~2009-09-12 13:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02 21:36 mnt_want_write_file() has problem? OGAWA Hirofumi
2009-08-03 18:31 ` Dave Hansen
2009-08-03 18:48   ` OGAWA Hirofumi
2009-08-03 20:37     ` Dave Hansen
2009-08-04 19:15 ` Dave Hansen
2009-08-05  5:37   ` Nick Piggin
2009-09-12 13:39   ` 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=20090912133944.GB5858@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linuxfoundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.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.