linux - Getting parent directory from struct file -
how parent directory struct file* in linux kernel driver?
i want information parent, , parents parent directory.
the dentry, have been looking moved beeing direct child of struct file struct path.
struct inode* parentdirinode(struct file* file) { return file->f_path.dentry->d_parent->d_inode; } still hope there better solution not break when change implementation structure. are there macros/functions overlooked?
Comments
Post a Comment