From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [RFC][PATCH 03/27] do_rmdir(): elevate write count Date: Thu, 08 Jun 2006 08:04:50 -0700 Message-ID: <1149779091.4097.38.camel@localhost.localdomain> References: <20060608001013.0D041507@localhost.localdomain> <20060608001016.24B1A11B@localhost.localdomain> <20060608104248.GC11996@MAIL.13thfloor.at> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, hch@infradead.org, trond.myklebust@fys.uio.no Return-path: Received: from e34.co.us.ibm.com ([32.97.110.152]:64395 "EHLO e34.co.us.ibm.com") by vger.kernel.org with ESMTP id S964858AbWFHPFv (ORCPT ); Thu, 8 Jun 2006 11:05:51 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k58F5mt6029242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 8 Jun 2006 11:05:48 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.6/NCO/VER7.0) with ESMTP id k58F5lgI271594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Jun 2006 09:05:47 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k58F5kM9029733 for ; Thu, 8 Jun 2006 09:05:47 -0600 To: Herbert Poetzl In-Reply-To: <20060608104248.GC11996@MAIL.13thfloor.at> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2006-06-08 at 12:42 +0200, Herbert Poetzl wrote: > > diff -puN fs/namei.c~rmdir1 fs/namei.c > > --- lxc/fs/namei.c~rmdir1 2006-06-07 16:53:13.000000000 -0700 > > +++ lxc-dave/fs/namei.c 2006-06-07 16:53:13.000000000 -0700 > > @@ -2012,7 +2012,12 @@ static long do_rmdir(int dfd, const char > > error = PTR_ERR(dentry); > > if (IS_ERR(dentry)) > > goto exit2; > > + error = mnt_want_write(nd.mnt); > > + if (error) > > + goto exit3; > > error = vfs_rmdir(nd.dentry->d_inode, dentry); > > + mnt_drop_write(nd.mnt); > > +exit3: > > IMHO, for consistency this should be named similar in > all the different places, so maybe make that? > > out_put: > > or maybe: > > out_rdonly: > > (same goest for the following patches) > otherwise fine I'm not too set on it either way. I tried to be consistent with some of the style in the functions, especially when they had a _lot_ of goto conditions. This one is right on the cusp of where I want to rock the boat. ;) -- Dave