From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: elementary d_move question Date: Wed, 23 Oct 2013 13:27:48 -0400 Message-ID: <20131023172748.GF30796@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Al Viro Return-path: Received: from fieldses.org ([174.143.236.118]:48360 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985Ab3JWR1v (ORCPT ); Wed, 23 Oct 2013 13:27:51 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: (Bah, apologies, I messed up the list cc. Resending in case it's useful to have the answer in the archives.) On Wed, Oct 23, 2013 at 01:23:38PM -0400, J. Bruce Fields wrote: > On Wed, Oct 23, 2013 at 05:14:02PM +0100, Al Viro wrote: > > On Wed, Oct 23, 2013 at 11:43:41AM -0400, J. Bruce Fields wrote: > > > > > The rename does a d_move(dentry, target) where I assume dentry is for > > > "foo" and target for "bar", with target the same dentry that the file > > > descriptor holds a reference on. > > > > > > But d_move() does > > > > > > switch_names(dentry, target); > > > > Yes > > > > > giving target name "foo" > > > > Not really. Check what it does when both names are inline ones (i.e. > > shorter than 32 characters and stored in struct dentry itself)... > > Doh--got it, thanks! > > I have a feeling I've gotten lost here before. > > I assume it's just never seemed worth the trouble to make the readlink > string more consistent given that its value's not really well-defined > anyway, OK. > > --b.