From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Wed, 16 Sep 2015 15:31:54 -0700 Subject: How to get the inode - no path_lookup In-Reply-To: References: Message-ID: <20150916223154.GA22045@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Fri, Sep 04, 2015 at 04:26:06PM +0000, priyamn wrote: > > Hi, > > I happened to come across this discussion. I am having a similar issue. > I am using Rhel7-3.10.0-123 > kernel. I tried all the options that are mentioned above and none of the api's > including kern_path() return valid dentry value. > My requirement is to fetch directory name from filepath. Why do you need a directory name from a filepath within the kernel? What problem are you trying to solve that you feel a directory name is the correct solution? And remember, namespaces, what does a "directory name" really mean... :) thanks, greg k-h