From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [patch 01/10] vfs: add path_create() and path_mknod() Date: Mon, 5 May 2008 22:46:56 -0700 Message-ID: <20080505224656.9126ec33.akpm@linux-foundation.org> References: <20080505101621.216789969@szeredi.hu> <20080505101640.143220902@szeredi.hu> <20080505211251.6c5dec8d.akpm@linux-foundation.org> <20080506042426.GU5882@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Miklos Szeredi , hch@infradead.org, dave@linux.vnet.ibm.com, ezk@cs.sunysb.edu, mhalcrow@us.ibm.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Hansen To: Al Viro Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:60295 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbYEFFse (ORCPT ); Tue, 6 May 2008 01:48:34 -0400 In-Reply-To: <20080506042426.GU5882@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 6 May 2008 05:24:26 +0100 Al Viro wrote: > On Mon, May 05, 2008 at 09:12:51PM -0700, Andrew Morton wrote: > > On Mon, 05 May 2008 12:16:22 +0200 Miklos Szeredi wrote: > > > > > R/O bind mounts require operations which modify the filesystem to be > > > wrapped in mnt_want_write()/mnt_drop_write(). Create helpers which do > > > this, so callers won't need to bother, and more importantly, cannot > > > forget! Call these path_*, analogous to vfs_*. Since there are no > > > callers of vfs_* left, make them static. > > > > ooh, yum. This appears to address my main complaint about the r-o-bind-mount > > stuff: fragility. > > > > > Overall this patchset is just 23 lines in the red, but at the same > > > time it fixes several places in nfsd and the whole of ecryptfs, where > > > the mnt_want_write/drop_write() calls were missing. > > > > Yeah, like that. > > Except that it fixes nothing in nfsd, as we'd already figured out and > "solution" for ecryptfs is more than slightly dubious. Not that nfsd > one wasn't... Well OK. But those open-coded mnt_want_write() calls all over the place still stink.