summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tapset/dentry.stp16
-rwxr-xr-xtestsuite/buildok/dentry.stp8
2 files changed, 9 insertions, 15 deletions
diff --git a/tapset/dentry.stp b/tapset/dentry.stp
index 1d045d02..bae022da 100644
--- a/tapset/dentry.stp
+++ b/tapset/dentry.stp
@@ -30,20 +30,6 @@ function __dentry_prepend:string(dentry:long,name:string)
-%{
-#include <linux/sched.h>
-#include <linux/fs_struct.h>
-%}
-
-
-function __dentry_get_current_root:long()
-%{
- THIS->__retvalue = (long)&current->fs->root;
-%}
-
-
-
-
/**
* sfunction d_name - get the dirent name
*
@@ -85,7 +71,7 @@ function reverse_path_walk:string(dentry:long)
*/
function d_path:string(nd:long)
{
- root = __dentry_get_current_root()
+ root = & @cast(task_current(), "task_struct")->fs->root
dentry = (@defined(@cast(nd,"nameidata")->path->dentry)
? @cast(nd,"nameidata")->path->dentry
: @cast(nd,"nameidata")->dentry)
diff --git a/testsuite/buildok/dentry.stp b/testsuite/buildok/dentry.stp
new file mode 100755
index 00000000..ed9b7c08
--- /dev/null
+++ b/testsuite/buildok/dentry.stp
@@ -0,0 +1,8 @@
+#! stap -p4
+
+probe begin
+{
+ println(d_name(0))
+ println(d_path(0))
+ println(reverse_path_walk(0))
+}