From: Dave Hansen <haveblue@us.ibm.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-kernel@vger.kernel.org, hch@infradead.org
Subject: Re: [RFC][PATCH 3/8] move mnt_want_write() out of may_open()
Date: Mon, 01 Oct 2007 13:10:28 -0700 [thread overview]
Message-ID: <1191269428.6024.22.camel@localhost> (raw)
In-Reply-To: <E1IcRMo-0000Qm-00@dorka.pomaz.szeredi.hu>
On Mon, 2007-10-01 at 21:55 +0200, Miklos Szeredi wrote:
> > @@ -1687,10 +1679,8 @@ static int open_namei_create(struct name
> > struct dentry *dir = nd->dentry;
> >
> > /*
> > - * This ensures that the mnt stays writable
> > - * over the vfs_create() call to may_open(),
> > - * which takes a more persistent
> > - * mnt_want_write().
> > + * This mnt_want_write() is potentially persistent,
> > + * and balanced in __fput()
> > */
> > error = mnt_want_write(nd->mnt);
> > if (error) {
>
> I'm confused: isn't it the mnt_want_write() in __dentry_open(), that
> is balanced in __fput()?
This is broken. I didn't realize that nameidata_to_filp() called
dentry_open. I'll rework these.
-- Dave
next prev parent reply other threads:[~2007-10-01 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-28 18:13 [RFC][PATCH 1/8] get mount write in __dentry_open() Dave Hansen
2007-09-28 18:13 ` [RFC][PATCH 2/8] move mnt_want_write() into open_namei_create() Dave Hansen
2007-09-28 18:13 ` [RFC][PATCH 3/8] move mnt_want_write() out of may_open() Dave Hansen
2007-10-01 19:55 ` Miklos Szeredi
2007-10-01 20:10 ` Dave Hansen [this message]
2007-09-28 18:13 ` [RFC][PATCH 4/8] do namei_flags calculation inside open_namei() Dave Hansen
2007-09-28 18:13 ` [RFC][PATCH 5/8] make open_namei() return a filp Dave Hansen
2007-09-28 18:13 ` [RFC][PATCH 6/8] kill do_filp_open() Dave Hansen
2007-09-28 18:13 ` [RFC][PATCH 7/8] kill filp_open() Dave Hansen
2007-09-28 18:13 ` [RFC][PATCH 8/8] keep track of mnt_writer state of struct file Dave Hansen
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=1191269428.6024.22.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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