From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: get vfsmount from dentry Date: Sun, 12 Mar 2006 18:24:20 +0000 Message-ID: <20060312182420.GD27946@ftp.linux.org.uk> References: <441425BB.6030604@it.iitb.ac.in> <20060312135543.GB27946@ftp.linux.org.uk> <44145873.6010802@it.iitb.ac.in> <20060312174149.GC27946@ftp.linux.org.uk> <441461D1.6090803@it.iitb.ac.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:20410 "EHLO ZenIV.linux.org.uk") by vger.kernel.org with ESMTP id S1751618AbWCLSYV (ORCPT ); Sun, 12 Mar 2006 13:24:21 -0500 To: Ashish Khurange Content-Disposition: inline In-Reply-To: <441461D1.6090803@it.iitb.ac.in> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sun, Mar 12, 2006 at 11:30:49PM +0530, Ashish Khurange wrote: > As per my knowledge in vfs layer file is either accessed by pathname or > file structure pointer. In file struct you have both dentry of the file > and vfsmount. When a file is accessed by a name first path look up > happens and its nameidata is created which holds both dentry and > vfsmount. In may function calls only dentry is passed as an argument. > Now I want the path name of the file (forget what I want, as term > pathname is not clear between us). For some reason, I need vfsmount of > the file as well. And I am telling you that dentry alone is not enough to find vfsmount. So unless the thing you need it for can't be done in other way, you are out of luck. See the previous mail for the reasons... Again, if for some reason you really need to find vfsmount inside a function that gets only dentry, you are stuck. Without knowing _why_ you need to find it and need to do that inside such function, there's nothing I (or anybody else) can do - as far as I know nobody here is a telepath.