From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: get vfsmount from dentry Date: Sun, 12 Mar 2006 19:13:19 +0000 Message-ID: <20060312191319.GE27946@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> <1142187797.4954.41.camel@localhost.localdomain> <44146E7E.8090902@it.iitb.ac.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Shaya Potter , linux-fsdevel@vger.kernel.org Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:64485 "EHLO ZenIV.linux.org.uk") by vger.kernel.org with ESMTP id S1751440AbWCLTNZ (ORCPT ); Sun, 12 Mar 2006 14:13:25 -0500 To: Ashish Khurange Content-Disposition: inline In-Reply-To: <44146E7E.8090902@it.iitb.ac.in> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Mar 13, 2006 at 12:24:54AM +0530, Ashish Khurange wrote: > In few functions (like sys_fchmod) I have file struct as an argument, > which provides me both vfsmount and dentry, hence I can find out > pathname of the file being changed. > Where as in few functions (like vfs_mkdir) I have only dentry and inode > of the directory, which are not sufficient to find the pathname. > > I hope I am clear now. mkdir /tmp/1 mkdir /tmp/2 mkdir /tmp/3 mount --bind /tmp/2 /tmp/1 mkdir /tmp/1/a umount /tmp/1 mount --bind /tmp/3 /tmp/1 mkdir /tmp/1/a umount /tmp/1 What output do you want to get from the last two mkdir() calls, assuming you do have vfsmounts? What is this output useful for?