-%{
-#include <linux/sched.h>
-#include <linux/fs_struct.h>
-%}
-
-
-function __dentry_get_current_root:long()
-%{
- THIS->__retvalue = (long)¤t->fs->root;
-%}
-
-
-
-
/**
* sfunction d_name - get the dirent name
*
*/
function d_path:string(nd:long)
{
- root = __dentry_get_current_root()
+ root = @cast(curr, "task_struct", "kernel<linux/sched.h>")->fs->root;
dentry = (@defined(@cast(nd,"nameidata")->path->dentry)
? @cast(nd,"nameidata")->path->dentry
: @cast(nd,"nameidata")->dentry)