]> sourceware.org Git - systemtap.git/commitdiff
Fixed compile problem on 3.18 kernels, caused by removal of dentry macro.
authorDavid Smith <dsmith@redhat.com>
Tue, 6 Jan 2015 16:07:01 +0000 (10:07 -0600)
committerDavid Smith <dsmith@redhat.com>
Tue, 6 Jan 2015 16:07:01 +0000 (10:07 -0600)
* runtime/linux/task_finder.c (__stp_call_mmap_callbacks_with_addr):
  Handle 'dentry' macro removal.
  (__stp_call_mmap_callbacks_for_task): Ditto.
* runtime/linux/task_finder2.c (__stp_call_mmap_callbacks_with_addr): Ditto.
  (__stp_call_mmap_callbacks_for_task): Ditto.

runtime/linux/task_finder.c
runtime/linux/task_finder2.c

index ae2aa5fc42c93a0213e962d8ea96fe99efbf1e8b..0913136fd7d4eba845829405fe545ad116b06a74 100644 (file)
@@ -731,7 +731,11 @@ __stp_call_mmap_callbacks_with_addr(struct stap_task_finder_target *tgt,
                length = vma->vm_end - vma->vm_start;
                offset = (vma->vm_pgoff << PAGE_SHIFT);
                vm_flags = vma->vm_flags;
+#ifdef STAPCONF_DPATH_PATH
+               dentry = vma->vm_file->f_path.dentry;
+#else
                dentry = vma->vm_file->f_dentry;
+#endif
 
                // Allocate space for a path
                mmpath_buf = _stp_kmalloc(PATH_MAX);
@@ -1245,6 +1249,7 @@ __stp_call_mmap_callbacks_for_task(struct stap_task_finder_target *tgt,
                            // get deleted from out under us.
                            vma_cache_p->f_path = &(vma->vm_file->f_path);
                            path_get(vma_cache_p->f_path);
+                           vma_cache_p->dentry = vma->vm_file->f_path.dentry;
 #else
                            // Notice we're increasing the reference
                            // count for 'dentry' and 'f_vfsmnt'.
@@ -1254,8 +1259,8 @@ __stp_call_mmap_callbacks_for_task(struct stap_task_finder_target *tgt,
                            dget(vma_cache_p->dentry);
                            vma_cache_p->f_vfsmnt = vma->vm_file->f_vfsmnt;
                            mntget(vma_cache_p->f_vfsmnt);
-#endif
                            vma_cache_p->dentry = vma->vm_file->f_dentry;
+#endif
                            vma_cache_p->addr = vma->vm_start;
                            vma_cache_p->length = vma->vm_end - vma->vm_start;
                            vma_cache_p->offset = (vma->vm_pgoff << PAGE_SHIFT);
index 6195c7c7f46985665b5a4c5eaa6e88df49b0690e..8081380f7bb0318fbc8e1339fa7c0f02546d4c1c 100644 (file)
@@ -692,7 +692,11 @@ __stp_call_mmap_callbacks_with_addr(struct stap_task_finder_target *tgt,
                length = vma->vm_end - vma->vm_start;
                offset = (vma->vm_pgoff << PAGE_SHIFT);
                vm_flags = vma->vm_flags;
+#ifdef STAPCONF_DPATH_PATH
+               dentry = vma->vm_file->f_path.dentry;
+#else
                dentry = vma->vm_file->f_dentry;
+#endif
 
                // Allocate space for a path
                mmpath_buf = _stp_kmalloc(PATH_MAX);
@@ -1185,6 +1189,7 @@ __stp_call_mmap_callbacks_for_task(struct stap_task_finder_target *tgt,
                            // get deleted from out under us.
                            vma_cache_p->f_path = &(vma->vm_file->f_path);
                            path_get(vma_cache_p->f_path);
+                           vma_cache_p->dentry = vma->vm_file->f_path.dentry;
 #else
                            // Notice we're increasing the reference
                            // count for 'dentry' and 'f_vfsmnt'.
@@ -1194,8 +1199,8 @@ __stp_call_mmap_callbacks_for_task(struct stap_task_finder_target *tgt,
                            dget(vma_cache_p->dentry);
                            vma_cache_p->f_vfsmnt = vma->vm_file->f_vfsmnt;
                            mntget(vma_cache_p->f_vfsmnt);
-#endif
                            vma_cache_p->dentry = vma->vm_file->f_dentry;
+#endif
                            vma_cache_p->addr = vma->vm_start;
                            vma_cache_p->length = vma->vm_end - vma->vm_start;
                            vma_cache_p->offset = (vma->vm_pgoff << PAGE_SHIFT);
This page took 0.03413 seconds and 5 git commands to generate.