我需要知道如何获取路径名或dentry从struct file给定的索引节点。
dentry
struct file
我曾经使用从路径名file_open获取struct file但总是给出内核恐慌。我需要一种方法来将我的 inode 列表中的 inode 与路径名中的 inode 进行比较,或者比较磁盘中的所有 inode 以找到相应的路径名,然后与我的 inode 列表进行比较。
file_open
kernel inode linux-kernel pathname
inode ×1
kernel ×1
linux-kernel ×1
pathname ×1