You get ALL dentries for the given inode. But I don't know,
whether such code traversion inode->i_dentry is valid in all situations.
Passing a dentry instead of inode is the easier variant, because
an dentry maps to exactly one inode, if it is a positive one[1]
The mapping from inode to dentries is 1:n and the thing the
poster wants is not possible with that, because the way the user
took to reach this inode is one of the n possibilities and we
don't know which one.
So this is a correctly pointed out design weakness: The way the
user took to reach the inode cannot be taken into account.
Regards
Ingo Oeser
[1] But we should never see permission checks for negative
dentries, since you cannot access what's not there ;-)
-- Science is what we can tell a computer. Art is everything else. --- D.E.Knuth - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/