X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Foprofile%2Fbuffer_sync.c;h=b07ba2a1411949cf7751d0830617a1ac34013abe;hb=776c0bcee6bc95c95f8677b720d99a464ca3af45;hp=78c2e6e4b42e254522a21ebec6c291d5bd6422cd;hpb=b361735043e3001eadb1d40916fd1a4fca1a9363;p=linux-2.6-omap-h63xx.git diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index 78c2e6e4b42..b07ba2a1411 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c @@ -26,7 +26,9 @@ #include #include #include - +#include +#include + #include "oprofile_stats.h" #include "event_buffer.h" #include "cpu_buffer.h" @@ -185,23 +187,22 @@ void sync_stop(void) end_sync(); } - + /* Optimisation. We can manage without taking the dcookie sem * because we cannot reach this code without at least one * dcookie user still being registered (namely, the reader * of the event buffer). */ -static inline unsigned long fast_get_dcookie(struct dentry * dentry, - struct vfsmount * vfsmnt) +static inline unsigned long fast_get_dcookie(struct path *path) { unsigned long cookie; - - if (dentry->d_cookie) - return (unsigned long)dentry; - get_dcookie(dentry, vfsmnt, &cookie); + + if (path->dentry->d_cookie) + return (unsigned long)path->dentry; + get_dcookie(path, &cookie); return cookie; } - + /* Look up the dcookie for the task's first VM_EXECUTABLE mapping, * which corresponds loosely to "application name". This is * not strictly necessary but allows oprofile to associate @@ -220,8 +221,7 @@ static unsigned long get_exec_dcookie(struct mm_struct * mm) continue; if (!(vma->vm_flags & VM_EXECUTABLE)) continue; - cookie = fast_get_dcookie(vma->vm_file->f_path.dentry, - vma->vm_file->f_path.mnt); + cookie = fast_get_dcookie(&vma->vm_file->f_path); break; } @@ -246,8 +246,7 @@ static unsigned long lookup_dcookie(struct mm_struct * mm, unsigned long addr, o continue; if (vma->vm_file) { - cookie = fast_get_dcookie(vma->vm_file->f_path.dentry, - vma->vm_file->f_path.mnt); + cookie = fast_get_dcookie(&vma->vm_file->f_path); *offset = (vma->vm_pgoff << PAGE_SHIFT) + addr - vma->vm_start; } else {