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

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -