From: Christoph Hellwig <hch@infradead.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Jan Kara <jack@suse.cz>, Josef Bacik <josef@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PULL REQUEST] ext3, jbd, ext2, and quota fixes for 3.1-rc1
Date: Tue, 26 Jul 2011 14:59:20 -0400 [thread overview]
Message-ID: <20110726185920.GA2970@infradead.org> (raw)
In-Reply-To: <20110726185220.GJ22133@ZenIV.linux.org.uk>
On Tue, Jul 26, 2011 at 07:52:20PM +0100, Al Viro wrote:
> Note that dentry obviously can't be NULL there. dentry->d_parent is never
> NULL. And dentry->d_parent would better not be negative, for crying out
> loud! What's worse, there's no guarantees that dentry->d_parent will
> remain our parent over that sync_mapping_buffers() *and* that inode won't
> just be freed under us (after rename() and memory pressure leading to
> eviction of what used to be our dentry->d_parent). Moreover, even if
> inode survives in icache, there is no promise that it will have an alias
> in dcache by the time we get to the next iteration of the loop, so this
> list_entry() next time around can bloody well happen to &inode->i_dentry,
> dentry being a garbage address somewhere inside that struct inode (or a
> bit above it - I hadn't compared offsets).
In addition to beeing bogus the code also is useless. fsync on a file
explicitly does not guarantee anything at all about the parent, and
never really has on Linux either.
next prev parent reply other threads:[~2011-07-26 18:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 18:14 [PULL REQUEST] ext3, jbd, ext2, and quota fixes for 3.1-rc1 Jan Kara
2011-07-26 18:36 ` Linus Torvalds
2011-07-26 18:52 ` Al Viro
2011-07-26 18:59 ` Christoph Hellwig [this message]
2011-07-26 19:14 ` Linus Torvalds
2011-07-27 0:31 ` Ted Ts'o
2011-07-26 20:16 ` Jan Kara
2011-07-26 20:10 ` Jan Kara
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=20110726185920.GA2970@infradead.org \
--to=hch@infradead.org \
--cc=jack@suse.cz \
--cc=josef@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).