Re: How to get the inode - no path_lookup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 17 Sep 2015 04:02, "Greg KH" <greg@xxxxxxxxx> wrote:
>
> 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
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Hi Priya,

Please make use of a single thread for one topic. There was another thread by you on the same topic. Anyways, I am replying to this one.

Greg has asked questions that you should ask yourself before going on with choosing one approach.

I had suggested you using kern_path() earlier, since it doesn't makes use of nameidata, but as you are telling its not working too. Here I would like to know the actual context of the approach so as to figure out if something I know that can work for you or maybe you shouldn't be doing it that way.

Enjoy life,
Rohan

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux