From 8d2d198796f66c82b7147cd9167c1a43265b9ba2 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 12 Mar 2010 11:39:52 -0800 Subject: Get d_path's root natively with @cast As mjw's aborted commit 5ab0b1b6 attempted, we can use a @cast to get the filesystem root for the current task instead of embedded-C. I've left it using the kernel debuginfo instead of headers for now, because all of the neighboring @casts are doing the same. * tapset/dentry.stp (d_path): Use @cast to get the root. (__dentry_get_current_root): Remove, no longer needed. * testsuite/buildok/dentry.stp: Test that dentry's functions all build. --- tapset/dentry.stp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'tapset/dentry.stp') 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 -#include -%} - - -function __dentry_get_current_root:long() -%{ - THIS->__retvalue = (long)¤t->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) -- cgit