parent inode from the current struct inode
Feb. 8, 2012
7:48 a.m.
Hi All, Is possible to get parent directory's inode structure from the current inode? If so, how can I do that? Also, is it possible to get the "struct file" if we have "struct inode" ?? Thanks, J
Feb. 8, 2012
8:39 a.m.
Hi Jack, On Wed, Feb 8, 2012 at 8:48 AM, Jack David <jd6589@gmail.com> wrote:
Hi All,
Is possible to get parent directory's inode structure from the current inode? If so, how can I do that?
It should be possible to use the container_of macro to get the parent dentry struct. Then, you can get the parent dentry d_parent and access its inode. (Please correct me, if I'm wrong. I didn't test it). Philipp
5301
Age (days ago)
5301
Last active (days ago)
1 comments
2 participants
participants (2)
-
Jack David -
Philipp Ittershagen