From: viro@parcelfarce.linux.theplanet.co.uk Subject: Re: changing permission()/vfs_permission... to work on dentry Date: Wed, 28 May 2003 22:48:22 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030528214822.GF14138@parcelfarce.linux.theplanet.co.uk> References: <1054154587.9356.15.camel@zaphod> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:29071 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S261168AbTE1VfG (ORCPT ); Wed, 28 May 2003 17:35:06 -0400 To: Shaya Potter Content-Disposition: inline In-Reply-To: <1054154587.9356.15.camel@zaphod> List-Id: linux-fsdevel.vger.kernel.org On Wed, May 28, 2003 at 04:43:08PM -0400, Shaya Potter wrote: > I've gone through the entire fs/* vfs layer picking out every use of > permission to see if it can easily use the dentry instead, and it can > (list below showing that the dentry is readily available in every vfs > case) Why not grep over the entire tree? That would've immediately show at least 6 cases when we do _not_ have a dentry; 2 of them rather nasty (floppy_open() in floppy.c/floppy98.c). The real question is what the hell would you _do_ with dentry? 1) It's worthless without vfsmount - alone it does *NOT* determine the pathname. 2) assuming that you've somehow got both vfsmount and dentry (and thus enough information to find the pathnam), what will you do with it? Anything that requires ->i_sem on ancestors is not an option - quite often they will be already locked. Moreover, there is no warranty that pathname won't change right under you - starting with the parent of your dentry. IOW, what's the real goal?