From: Al Viro <viro@ZenIV.linux.org.uk>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: linux-btrfs@vger.kernel.org, Chris Mason <clm@fb.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: d_instantiate() and unlock_new_inode() order in btrfs_mkdir()
Date: Thu, 19 Apr 2018 01:15:59 +0100 [thread overview]
Message-ID: <20180419001559.GG30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180419000612.GF30522@ZenIV.linux.org.uk>
On Thu, Apr 19, 2018 at 01:06:13AM +0100, Al Viro wrote:
> On Wed, Apr 18, 2018 at 05:00:29PM -0700, Eric Biggers wrote:
> > Hi Chris and other btrfs folks,
> >
> > btrfs_mkdir() calls d_instantiate() before unlock_new_inode(), which is wrong
> > because it exposes the inode to lookups before it's been fully initialized.
>
> Huh? It *is* fully initialized by that point; what else is left to do?
ISTR something about false positives from lockdep (with
lockdep_annotate_inode_mutex_key() called too late, perhaps?); said that, it
was a long time ago and I don't remember details at the moment... Are you
actually seeing a deadlock there or is that just lockdep complaining?
next prev parent reply other threads:[~2018-04-19 0:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 0:00 d_instantiate() and unlock_new_inode() order in btrfs_mkdir() Eric Biggers
2018-04-19 0:06 ` Al Viro
2018-04-19 0:15 ` Al Viro [this message]
2018-04-19 0:54 ` Eric Biggers
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=20180419001559.GG30522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=clm@fb.com \
--cc=ebiggers3@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox