All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Hugh Dickins <hughd@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Dominique Martinet <asmadeus@codewreck.org>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Dominique Martinet <dominique.martinet@cea.fr>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: [git pull] vfs.git spurious ENOTDIR fix
Date: Sun, 2 Aug 2015 05:39:47 +0100	[thread overview]
Message-ID: <20150802043947.GB17109@ZenIV.linux.org.uk> (raw)
In-Reply-To: <alpine.LSU.2.11.1508012045250.17084@eggly.anvils>

On Sat, Aug 01, 2015 at 09:06:55PM -0700, Hugh Dickins wrote:

> (I don't actually understand why the clearing of DCACHE_ENTRY_TYPE in
> dentry_iput() is not of continuing concern; but don't worry, there's
> plenty I don't understand - so long as you're both satisfied that
> it's not a concern, no need to persuade me.)

Because before we even get to dentry_iput(), we evict the fucker from hash.
And that will do dentry_rcuwalk_invalidate(dentry), which will bump ->d_seq
*AFTER* having it unhashed.  Now look at __d_lookup_rcu() - there we fetch
->d_seq, then verify that it's still hashed.

So having hit dentry_iput() means that everyone who'd found it via RCU
lookup will be guaranteed a ->d_seq mismatch.  The same goes for things
like d_drop() and d_instantiate().  Look for dentry_rcuwalk_invalidate()
callers in there...

Clearing DCACHE_ENTRY_TYPE there is fine - dentry *is* made negative there,
after all.  What we want is to have ->d_inode stable at least as long as
->d_seq remains so.

  reply	other threads:[~2015-08-02  4:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 17:46 v4.2-rc dcache regression, probably 75a6f82a0d10 Hugh Dickins
2015-07-31 17:59 ` Dominique Martinet
2015-07-31 18:00 ` J. Bruce Fields
2015-07-31 18:42 ` Linus Torvalds
2015-07-31 19:42   ` Hugh Dickins
2015-07-31 20:50     ` Dominique Martinet
2015-07-31 22:52       ` Linus Torvalds
2015-08-01  0:20         ` Hugh Dickins
2015-08-01  5:58           ` Dominique Martinet
2015-08-01  7:26         ` Al Viro
2015-08-01 10:19           ` Dominique Martinet
2015-08-01 10:50             ` Dominique Martinet
2015-08-01 16:09           ` Linus Torvalds
2015-08-01 17:09             ` Al Viro
2015-08-02  0:14             ` [git pull] vfs.git spurious ENOTDIR fix Al Viro
2015-08-02  0:23               ` Al Viro
2015-08-02  0:42                 ` Linus Torvalds
2015-08-02  0:57                 ` Linus Torvalds
2015-08-02  1:41                   ` Al Viro
2015-08-02  2:39                     ` Linus Torvalds
2015-08-02  4:06                       ` Hugh Dickins
2015-08-02  4:39                         ` Al Viro [this message]
2015-08-02  4:42                         ` Linus Torvalds
2015-08-02 18:53                           ` Hugh Dickins
2015-08-01  0:09       ` v4.2-rc dcache regression, probably 75a6f82a0d10 Hugh Dickins
2015-08-01  4:20     ` Hugh Dickins

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=20150802043947.GB17109@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=asmadeus@codewreck.org \
    --cc=bfields@fieldses.org \
    --cc=dhowells@redhat.com \
    --cc=dominique.martinet@cea.fr \
    --cc=hughd@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.