From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs_mknod/create() Date: Mon, 02 Jul 2007 16:31:48 -0700 Message-ID: <1183419108.14314.40.camel@localhost> References: <20070622200303.82D9CC3A@kernel> <20070622200332.DCCD1884@kernel> <20070623075103.GS27954@infradead.org> <1182784792.26162.86.camel@localhost> <20070630093901.GI22354@infradead.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: akpm@osdl.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk To: Christoph Hellwig Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:59722 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755936AbXGBXbu (ORCPT ); Mon, 2 Jul 2007 19:31:50 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l62NVnds031010 for ; Mon, 2 Jul 2007 19:31:49 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l62NVn9r464630 for ; Mon, 2 Jul 2007 19:31:49 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l62NVmCL017017 for ; Mon, 2 Jul 2007 19:31:49 -0400 In-Reply-To: <20070630093901.GI22354@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, 2007-06-30 at 10:39 +0100, Christoph Hellwig wrote: > On Mon, Jun 25, 2007 at 08:19:52AM -0700, Dave Hansen wrote: > > > Should we just take the calls outside the switch statement? > > > > Yeah, that's much better. I assume we don't care whether we're getting > > -EROFS or -EPERM/-EINVAL for the S_IFDIR and default cases? > > We need to keep the exact error returns, so you'll have to add some > special case checks before the r/o check. It's probably still cleaner, > though. I'm looking through this and having a really hard time seeing any nice ways to make this cleaner. Were you thinking of basically a duplicate case statement before the r/w check? -- Dave