Messages in this thread | | | Date | Sat, 20 Feb 1999 18:26:16 -0800 (PST) | From | Mike Kennedy <> | Subject | Re: Directory Entry for File |
| |
Ok. Sorry for continuing to pose this question. Say I have the following situation where there is a file called foo in the /tmp directory. How can I given the inode for the file 'foo' get the inode for the directory, /tmp. This is within kernel space.
:===========================================================: : Mike Kennedy mkennedy@cs.ucr.edu : : Systems Administrator (909) 787-2946 : : Computer Science Department : : University of California, Riverside : :===========================================================:
On Sat, 20 Feb 1999, Alexander Viro wrote:
> > > On Sat, 20 Feb 1999, Mike Kennedy wrote: > > > > > Ok... let me re phrase. I'm talking about kernel space. I need to, given > > an inode for a file that is being read, for example, find the > > corresponding filename string that is contained in the directory entry. > > Look at sys_getpwd() and do it for all dentries over your inode > (cyclic list I've mentioned). Why not do it on open()? There you have the > name for free and to read stuff one has to open the file. > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.rutgers.edu > Please read the FAQ at http://www.tux.org/lkml/ >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |