Re: inode->dentry translation..

David S. Miller (davem@redhat.com)
Sat, 3 Jul 1999 03:58:27 -0700


Date: Thu, 1 Jul 1999 23:51:16 +0000 (WAT)
From: Massoud Asgharifard <asghari@linux.ce.sharif.ac.ir>

Is there any fast and secure way to translate from inode numbers to
dentry pointers? (assuming dentries are in memory.) Is the struct
list_head inode->i_dentry safe enough to use at all times?

The i_dentry list points to "names" which represent the file "object"
of that inode which the kernel has done a lookup for.

It is not a 1 to 1 mapping, there can be several dentries pointing to
the same inode, just like the file "bar" and symlinks to it point to
the same file contents.

Later,
David S. Miller
davem@redhat.com

-
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/