> > This one should work, since the file descriptor in the working > > directory should prevent the inode from going away. Or is there > > something I'm missing? > > We like to have a way of searching a directory hierarchy 100000 levels > deep without needing to have 100000 open file descriptors.
No, you only need _one_ file descriptor for the current directory. That will hold a reference to all indodes above that in the tree, which is what you need to be able to detect a cycle. Miklos
