]> sourceware.org Git - systemtap.git/commitdiff
Remove unnecessary embedded-c function __dentry_get_current_root().
authorMark Wielaard <mjw@redhat.com>
Mon, 8 Mar 2010 16:15:52 +0000 (17:15 +0100)
committerMark Wielaard <mjw@redhat.com>
Wed, 10 Mar 2010 14:44:17 +0000 (15:44 +0100)
* tapset/dentry.stp: Removed embedded-c include and function
  __dentry_get_current_root(). Use task_current and @cast in d_path().

tapset/dentry.stp

index 1d045d02bbe2f040ce4213a3f15f547f4864d47d..778832f922ad24e7913225b02931596142d83ffe 100644 (file)
@@ -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(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)
This page took 0.027941 seconds and 5 git commands to generate.