lkml.org 
[lkml]   [2006]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[Question] how to follow a symlink via a dentry?
From
Date
What is the best way from inside the kernel, to find the dentry that
another dentry points to via symlink?

Scenario:

I have a kobj of a device in the sysfs system. Inside a directory of
the kobj, is a symlink to another device I need to get. I can find the
dentry of the symlink, but I haven't found a good way to get to the
dentry of what the symlink points to.

Is there a standard way to do this, or do I need to start hacking at the
follow_link of the sysfs directory to get what I want?

Do I need to hack up something like page_readlink to get the path, and
then do vfs_follow_link to get the rest. Another thing is that I can't
rely on what current->fs points to.

Thanks,

-- Steve


-
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/

\
 
 \ /
  Last update: 2006-05-23 18:58    [W:0.038 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site