From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [RFC][PATCH 23/27] elevate write count over calls to vfs_rename() Date: Mon, 12 Jun 2006 20:03:35 +0100 Message-ID: <20060612190335.GF27946@ftp.linux.org.uk> References: <20060608001013.0D041507@localhost.localdomain> <20060608001036.3B8AEAE2@localhost.localdomain> <20060612181804.GE27946@ftp.linux.org.uk> <1150136964.13644.64.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, herbert@13thfloor.at, hch@infradead.org, trond.myklebust@fys.uio.no Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:19693 "EHLO ZenIV.linux.org.uk") by vger.kernel.org with ESMTP id S1752172AbWFLTDh (ORCPT ); Mon, 12 Jun 2006 15:03:37 -0400 To: Dave Hansen Content-Disposition: inline In-Reply-To: <1150136964.13644.64.camel@localhost.localdomain> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Jun 12, 2006 at 11:29:24AM -0700, Dave Hansen wrote: > On Mon, 2006-06-12 at 19:18 +0100, Al Viro wrote: > > On Wed, Jun 07, 2006 at 05:10:36PM -0700, Dave Hansen wrote: > > > + error = mnt_want_write(oldnd.mnt); > > > if (error) > > > goto exit1; > > > > > > + error = do_path_lookup(newdfd, newname, LOOKUP_PARENT, &newnd); > > > + if (error) > > > + goto exit2; > > > + > > > + error = mnt_want_write(oldnd.mnt); > > > > WTF? Why raise it twice? > > That's a bug. The second raise should be for newnd.mnt. No, it should not. These two should be collapsed into one and done after we'd checked that vfsmounts are equal