summaryrefslogtreecommitdiffstats
path: root/runtime/task_finder.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/task_finder.c')
-rw-r--r--runtime/task_finder.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index d0a9a40f..ffbc3d0c 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -153,11 +153,12 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen)
vma = vma->vm_next;
}
if (vma) {
- struct vfsmount *mnt = mntget(vma->vm_file->f_vfsmnt);
- struct dentry *dentry = dget(vma->vm_file->f_dentry);
- rc = d_path(dentry, mnt, buf, buflen);
- dput(dentry);
- mntput(mnt);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+ rc = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt,
+ buf, buflen);
+#else
+ rc = d_path(vma->vm_file, buf, buflen);
+#endif
}
else {
*buf = '\0';