From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:39578 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752511AbeDSAGP (ORCPT ); Wed, 18 Apr 2018 20:06:15 -0400 Date: Thu, 19 Apr 2018 01:06:13 +0100 From: Al Viro To: Eric Biggers Cc: linux-btrfs@vger.kernel.org, Chris Mason , linux-fsdevel@vger.kernel.org Subject: Re: d_instantiate() and unlock_new_inode() order in btrfs_mkdir() Message-ID: <20180419000612.GF30522@ZenIV.linux.org.uk> References: <20180419000029.GA133757@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180419000029.GA133757@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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?