How to get dentry from inode number?

From: ??
Date: Fri Jul 29 2005 - 10:06:14 EST

Hello, every body.

How can I get a full pathname from an inode number ? (Our data
structure only keep track inode number instead of pathname in
order to keep thin, so don't have any information but inode

I used iget_locked() to get a struct inode * from an inode number,
and use d_find_alias() to get a dentry, finally use d_path() to get
a absoulte path to the file.

But it only works when I opened the target file before I run
my program, or the d_find_alias() will return NULL.

I also tried d_alloc_anno() and d_splice_alias(), but it crashed
in the d_splice_alias().

So, which function should I check to find the answer?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at